lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_27(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 8}, 'CONFIDENCE': {'MEDIUM': 8}}\n", "self.check_example('os-spawn.py', VAR_2)\n" ]
[ "def test_os_spawn(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 8}, 'CONFIDENCE': {'MEDIUM': 8}}\n", "self.check_example('os-spawn.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_17(self, VAR_18):...\n", "VAR_46 = self.container.page_num(VAR_18)\n", "self.container.remove_page(VAR_46)\n", "self.update_tab_bar_visibility()\n" ]
[ "def close_tab(self, child_widget):...\n", "page_num = self.container.page_num(child_widget)\n", "self.container.remove_page(page_num)\n", "self.update_tab_bar_visibility()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe import _\n", "from erpnext.hr.doctype.leave_application.leave_application import get_leave_allocation_records, get_leave_balance_on, get_approved_leaves_for_period\n", "def FUNC_0(VAR_0=None):...\n", "VAR_1 = frappe.db.sql_list('...
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe import _\n", "from erpnext.hr.doctype.leave_application.leave_application import get_leave_allocation_records, get_leave_balance_on, get_approved_leaves_for_period\n", "def execute(filters=None):...\n", "leave_types = frappe.db.s...
[ 0, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3).company_id.id\n", "VAR_7 = []\n", "VAR_8 = self.pool.get('ir.model.data')\n", "VAR_9 = self.pool.get('account.bank.statement')\n", "VAR_10 = self.pool.get('acc...
[ "def close_statement(self, cr, uid, ids, context):...\n", "\"\"\"docstring\"\"\"\n", "company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id\n", "list_statement = []\n", "mod_obj = self.pool.get('ir.model.data')\n", "statement_obj = self.pool.get('account.bank.statement')\n", "journa...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Condition", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "...
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "if not self.issue_gcs_flushes:\n", "return\n", "if self.gcs_flush_policy is None:\n", "VAR_45 = self.redis.get('gcs_flushing_policy')\n", "if not self.gcs_flush_policy.should_flush(self.redis_shard):\n", "if VAR_45 is None:\n", "return\n", "VAR...
[ "def _maybe_flush_gcs(self):...\n", "\"\"\"docstring\"\"\"\n", "if not self.issue_gcs_flushes:\n", "return\n", "if self.gcs_flush_policy is None:\n", "serialized = self.redis.get('gcs_flushing_policy')\n", "if not self.gcs_flush_policy.should_flush(self.redis_shard):\n", "if serialized is None:\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Return'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def __repr__(self):...\n", "return self.__class__.__name__ + '()'\n" ]
[ "def __repr__(self):...\n", "return self.__class__.__name__ + '()'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_60(self):...\n", "VAR_2 = {'SEVERITY': {'HIGH': 1}, 'CONFIDENCE': {'HIGH': 1}}\n", "self.check_example('input.py', VAR_2)\n" ]
[ "def test_blacklist_input(self):...\n", "expect = {'SEVERITY': {'HIGH': 1}, 'CONFIDENCE': {'HIGH': 1}}\n", "self.check_example('input.py', expect)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_3(self, VAR_14):...\n", "if not self.stopThreads:\n", "VAR_13 = VAR_14.result()[0].text\n", "return None\n", "VAR_37 = VAR_14.ext[0]\n", "VAR_28 = self.isASuccessfulUpload(VAR_13)\n", "if VAR_28:\n", "self.validExtensions.append(VAR_37)\n", "return VAR_28\n", "if self.shouldLog:\n", "s...
[ "def detectValidExtension(self, future):...\n", "if not self.stopThreads:\n", "html = future.result()[0].text\n", "return None\n", "ext = future.ext[0]\n", "r = self.isASuccessfulUpload(html)\n", "if r:\n", "self.validExtensions.append(ext)\n", "return r\n", "if self.shouldLog:\n", "self.logger....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Expr'", "Return'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_9(self, VAR_16, **VAR_17):...\n", "if self.closed:\n", "VAR_32 = VAR_17.pop('wait', False)\n", "VAR_9 = self._create_request(VAR_16, **args)\n", "if self.VERBOSE:\n", "VAR_21 = parse_message(VAR_9)\n", "if VAR_32:\n", "print(' <-', VAR_21)\n", "self._conn.send(VAR_9)\n", "VAR_39 = self._...
[ "def send_request(self, command, **args):...\n", "if self.closed:\n", "wait = args.pop('wait', False)\n", "req = self._create_request(command, **args)\n", "if self.VERBOSE:\n", "msg = parse_message(req)\n", "if wait:\n", "print(' <-', msg)\n", "self._conn.send(req)\n", "resp_awaiter = self._get_aw...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_0(VAR_0='_Test Event', VAR_1=None):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.utils import get_datetime\n", "VAR_2 = frappe.get_doc({'doctype': 'Event', 'subject': VAR_0, 'event_type':\n 'Public', 'starts_on': get_datetime(VAR_1)}).insert(ignore_permissions=True\n )\n", "return VAR_2\n"...
[ "def create_event(subject='_Test Event', starts_on=None):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.utils import get_datetime\n", "event = frappe.get_doc({'doctype': 'Event', 'subject': subject,\n 'event_type': 'Public', 'starts_on': get_datetime(starts_on)}).insert(\n ignore_permissions=True)\n", ...
[ 0, 0, 0, 0, 4 ]
[ "FunctionDef'", "Docstring", "ImportFrom'", "Assign'", "Return'" ]
[ "def FUNC_11(self, VAR_13, VAR_12):...\n", "self.send_rep(VAR_13, 0, wzrpc.status.success, VAR_12)\n" ]
[ "def send_success_rep(self, reqid, data):...\n", "self.send_rep(reqid, 0, wzrpc.status.success, data)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_13(self):...\n", "self.assertTrue(os.path.realpath(path2).startswith(os.path.realpath(path1)),\n 'Nested temporary dir should be created within outer dir.')\n" ]
[ "def test_temporary_dir_with_root_dir(self):...\n", "self.assertTrue(os.path.realpath(path2).startswith(os.path.realpath(path1)),\n 'Nested temporary dir should be created within outer dir.')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(self):...\n", "self.expected_requests([('http://localhost/a', {}, 'foo', None)])\n", "VAR_0 = xsrf_client.XsrfRemote('http://localhost/')\n", "self.assertEqual('foo', VAR_0.url_read('/a'))\n" ]
[ "def testXsrfRemoteGET(self):...\n", "self.expected_requests([('http://localhost/a', {}, 'foo', None)])\n", "remote = xsrf_client.XsrfRemote('http://localhost/')\n", "self.assertEqual('foo', remote.url_read('/a'))\n" ]
[ 0, 5, 5, 5 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_1():...\n", "return None\n" ]
[ "def update_history():...\n", "return None\n" ]
[ 0, 4 ]
[ "FunctionDef'", "Return'" ]
[ "@wraps(VAR_3)...\n", "VAR_6 = VAR_5.headers.get(VAR_1)\n", "VAR_11 = VAR_5.session.get_csrf_token()\n", "if VAR_6 == VAR_11:\n", "return VAR_3(VAR_9, VAR_5)\n" ]
[ "@wraps(fn)...\n", "token = request.headers.get(HEADER_NAME)\n", "session_token = request.session.get_csrf_token()\n", "if token == session_token:\n", "return fn(context, request)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Return'" ]
[ "from __future__ import absolute_import, division, print_function, with_statement\n", "import os\n", "import sys\n", "import argparse\n", "if __name__ == '__main__':\n", "VAR_0 = argparse.ArgumentParser(description='See README')\n", "VAR_0.add_argument('-c', '--count', default=3, type=int, help=\n 'w...
[ "from __future__ import absolute_import, division, print_function, with_statement\n", "import os\n", "import sys\n", "import argparse\n", "if __name__ == '__main__':\n", "parser = argparse.ArgumentParser(description='See README')\n", "parser.add_argument('-c', '--count', default=3, type=int, help=\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 2 ]
[ "ImportFrom'", "Import'", "Import'", "Import'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Condition", "Assign'", "AugAssign'", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "@memoized_property...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = self.get_binary_path_from_tgz(VAR_10='bin/yarnpkg', VAR_6=self.\n yarnpkg_version, VAR_11='yarnpkg.tar.gz', VAR_12='dist')\n", "VAR_0.debug('Yarnpkg path: %s', VAR_22)\n", "return VAR_22\n" ]
[ "@memoized_property...\n", "\"\"\"docstring\"\"\"\n", "yarnpkg_path = self.get_binary_path_from_tgz(supportdir='bin/yarnpkg',\n version=self.yarnpkg_version, filename='yarnpkg.tar.gz', inpackage_path\n ='dist')\n", "logger.debug('Yarnpkg path: %s', yarnpkg_path)\n", "return yarnpkg_path\n" ]
[ 2, 0, 2, 2, 2 ]
[ "Condition", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = set()\n", "for VAR_28, VAR_27 in zip(self.output, self.rule.output):\n", "if VAR_28 in self.dynamic_output:\n", "VAR_16 = defaultdict(list)\n", "for VAR_28, w in self.expand_dynamic(VAR_27, VAR_13=self.wildcards, VAR_14=\n", "for combination in VA...
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "combinations = set()\n", "for f, f_ in zip(self.output, self.rule.output):\n", "if f in self.dynamic_output:\n", "wildcards = defaultdict(list)\n", "for f, w in self.expand_dynamic(f_, restriction=self.wildcards, omit_value=\n", "for combination in combina...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "For", "Condition", "Assign'", "For", "For", "Expr'", "For", "Return'", "Expr'" ]
[ "def FUNC_1(self):...\n", "return 'submit sources %s for task %s (ID %d) %s' % (repr(self.filenames),\n self.task[1], self.task[0], self.url)\n" ]
[ "def describe(self):...\n", "return 'submit sources %s for task %s (ID %d) %s' % (repr(self.filenames),\n self.task[1], self.task[0], self.url)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@validate(VAR_0=VMeetup('id'), VAR_15=VMenu('controller', CommentSortMenu),...\n", "VAR_18 = Link._byID(VAR_0.assoc_link)\n", "VAR_20 = c.user.pref_num_comments or g.num_comments\n", "VAR_21 = g.max_comments if VAR_16 == 'true' else VAR_20\n", "VAR_22 = CommentBuilder(VAR_18, CommentSortMenu.operator(VAR_1...
[ "@validate(meetup=VMeetup('id'), sort=VMenu('controller', CommentSortMenu),...\n", "article = Link._byID(meetup.assoc_link)\n", "user_num = c.user.pref_num_comments or g.num_comments\n", "num = g.max_comments if num_comments == 'true' else user_num\n", "builder = CommentBuilder(article, CommentSortMenu.oper...
[ 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'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'", "Expr'" ]
[ "@api.multi...\n", "return self.write({'has_agreed_child_protection_charter': True,\n 'date_agreed_child_protection_charter': fields.Datetime.now()})\n" ]
[ "@api.multi...\n", "return self.write({'has_agreed_child_protection_charter': True,\n 'date_agreed_child_protection_charter': fields.Datetime.now()})\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_1(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = psycopg2.connect('dbname=forum')\n", "VAR_2 = VAR_1.cursor()\n", "VAR_2.execute(\"INSERT INTO posts (content) VALUES ('%s')\" % VAR_0)\n", "VAR_1.commit()\n", "VAR_1.close()\n" ]
[ "def add_post(content):...\n", "\"\"\"docstring\"\"\"\n", "db = psycopg2.connect('dbname=forum')\n", "c = db.cursor()\n", "c.execute(\"INSERT INTO posts (content) VALUES ('%s')\" % content)\n", "db.commit()\n", "db.close()\n" ]
[ 0, 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self):...\n", "VAR_24 = self.add_argument_group('Facebook Messenger')\n", "VAR_24.add_argument('--debug', dest='is_debug', action='store_true', help=\n 'print and log all server interactions and messages')\n", "VAR_24.add_argument('--verbose', dest='verbose', action='store_true', help=\n 'pr...
[ "def add_messenger_args(self):...\n", "messenger = self.add_argument_group('Facebook Messenger')\n", "messenger.add_argument('--debug', dest='is_debug', action='store_true',\n help='print and log all server interactions and messages')\n", "messenger.add_argument('--verbose', dest='verbose', action='store_t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_32(self, VAR_15):...\n", "for file_col in self.get_file_column_list():\n", "if self.is_file(file_col):\n", "for file_col in self.get_image_column_list():\n", "if getattr(VAR_15, file_col):\n", "if self.is_image(file_col):\n", "VAR_28 = FileManager()\n", "if getattr(VAR_15, file_col):\n", "...
[ "def _delete_files(self, item):...\n", "for file_col in self.get_file_column_list():\n", "if self.is_file(file_col):\n", "for file_col in self.get_image_column_list():\n", "if getattr(item, file_col):\n", "if self.is_image(file_col):\n", "fm = FileManager()\n", "if getattr(item, file_col):\n", "fm.d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "For", "Condition", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "@jwt_required...\n", "if VAR_5:\n", "VAR_11 = {'instance_id': VAR_5, 'user_id': VAR_6}\n", "VAR_10 = {'results': Table.query(), 'status': 'success'}\n", "VAR_12 = Table.filter_by(**query)\n", "return jsonify(VAR_10), 200\n", "if len(VAR_12) < 1:\n", "VAR_10 = {'results': 'Instance not found', 'status...
[ "@jwt_required...\n", "if instance_id:\n", "query = {'instance_id': instance_id, 'user_id': user_id}\n", "response_object = {'results': Table.query(), 'status': 'success'}\n", "results = Table.filter_by(**query)\n", "return jsonify(response_object), 200\n", "if len(results) < 1:\n", "response_object =...
[ 4, 4, 4, 4, 4, 0, 0, 4, 4, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Return'", "Condition", "Assign'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_6(self, VAR_24):...\n", "VAR_39 = self.metadata('queries', VAR_20=database_name, VAR_22=False) or {}\n", "VAR_40 = VAR_39.keys()\n", "return [self.get_canned_query(VAR_24, VAR_62) for VAR_62 in VAR_40]\n" ]
[ "def get_canned_queries(self, database_name):...\n", "queries = self.metadata('queries', database=database_name, fallback=False) or {\n }\n", "names = queries.keys()\n", "return [self.get_canned_query(database_name, name) for name in names]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_8(self):...\n", "VAR_3 = DatabaseQuery('DocField').execute(filters={'parent': 'DocType'},\n fields=['fieldname', 'fieldtype'], or_filters=[{'fieldtype': 'Table'},\n {'fieldtype': 'Select'}])\n", "self.assertTrue({'fieldtype': 'Table', 'fieldname': 'fields'} in VAR_3)\n", "self.assertTrue({'fie...
[ "def test_or_filters(self):...\n", "data = DatabaseQuery('DocField').execute(filters={'parent': 'DocType'},\n fields=['fieldname', 'fieldtype'], or_filters=[{'fieldtype': 'Table'},\n {'fieldtype': 'Select'}])\n", "self.assertTrue({'fieldtype': 'Table', 'fieldname': 'fields'} in data)\n", "self.assertTru...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_1(self):...\n", "VAR_14 = self.builder.get_object('headerbar')\n", "VAR_14.set_subtitle(self.database_filepath)\n", "self.window.set_titlebar(VAR_14)\n", "self.parent_widget.set_headerbar(VAR_14)\n", "VAR_15 = self.builder.get_object('back_button')\n", "VAR_15.connect('clicked', self.on_header...
[ "def set_headerbar(self):...\n", "headerbar = self.builder.get_object('headerbar')\n", "headerbar.set_subtitle(self.database_filepath)\n", "self.window.set_titlebar(headerbar)\n", "self.parent_widget.set_headerbar(headerbar)\n", "back_button = self.builder.get_object('back_button')\n", "back_button.conn...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_28(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_65 = [x[VAR_1] for x in self.get_path(VAR_21)]\n", "return VAR_65\n" ]
[ "def listdir(self, path):...\n", "\"\"\"docstring\"\"\"\n", "names = [x[A_NAME] for x in self.get_path(path)]\n", "return names\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_37(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'TRUNCATE TABLE players;'\n", "tools.query(VAR_11)\n", "self.assertEqual(FUNC_5(VAR_1='Fissh Fillay', VAR_2='Playland'), 0)\n", "VAR_11 = 'SELECT * FROM matches ORDER BY id LIMIT 1'\n", "VAR_13 = tools.query(VAR_11)\n", "VAR_14 = str(VAR_...
[ "def test_p2_not_valid(self):...\n", "\"\"\"docstring\"\"\"\n", "q = 'TRUNCATE TABLE players;'\n", "tools.query(q)\n", "self.assertEqual(dummy_player(player_name='Fissh Fillay', country=\n 'Playland'), 0)\n", "q = 'SELECT * FROM matches ORDER BY id LIMIT 1'\n", "p = tools.query(q)\n", "i1 = str(p[0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_4(self, VAR_11, VAR_7):...\n", "self.eng.flush(deallocate_qubits=False)\n", "if VAR_11 == 'PauliX' or VAR_11 == 'PauliY' or VAR_11 == 'PauliZ':\n", "VAR_19 = self.eng.backend.get_expectation_value(pq.ops.QubitOperator(str(\n VAR_11)[-1] + '0'), self.reg)\n", "if VAR_11 == 'AllPauliZ':\n", "VA...
[ "def expectation(self, observable, wires):...\n", "self.eng.flush(deallocate_qubits=False)\n", "if observable == 'PauliX' or observable == 'PauliY' or observable == 'PauliZ':\n", "expectation_value = self.eng.backend.get_expectation_value(pq.ops.\n QubitOperator(str(observable)[-1] + '0'), self.reg)\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'" ]
[ "def FUNC_22(VAR_30, VAR_31=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_31 is None:\n", "VAR_31 = threading.Lock()\n", "return CLASS_0(VAR_30, VAR_31)\n" ]
[ "def thread_safe_client(client, lock=None):...\n", "\"\"\"docstring\"\"\"\n", "if lock is None:\n", "lock = threading.Lock()\n", "return _ThreadSafeProxy(client, lock)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1):...\n", "" ]
[ "def json_validate(data_source, schema):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_17(self, VAR_15=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_37 = self._meta.all_fields if VAR_15 else self._meta.fields\n", "return dict((VAR_46.name, v) for VAR_46, v in field_iter_items(self, VAR_37))\n" ]
[ "def to_dict(self, include_virtual=True):...\n", "\"\"\"docstring\"\"\"\n", "fields = self._meta.all_fields if include_virtual else self._meta.fields\n", "return dict((f.name, v) for f, v in field_iter_items(self, fields))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def __init__(self, VAR_1, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "super(CLASS_0, self).__init__(VAR_1, VAR_4)\n", "VAR_1 = self.bindings\n", "VAR_1['TEST_APP_COMPONENT_NAME'] = '{app}-{stack}-{detail}'.format(app=\n bindings['TEST_APP'], stack=bindings['TEST_STACK'], detail=bindings[\n 'TEST_...
[ "def __init__(self, bindings, agent=None):...\n", "\"\"\"docstring\"\"\"\n", "super(GoogleSmokeTestScenario, self).__init__(bindings, agent)\n", "bindings = self.bindings\n", "bindings['TEST_APP_COMPONENT_NAME'] = '{app}-{stack}-{detail}'.format(app=\n bindings['TEST_APP'], stack=bindings['TEST_STACK'], ...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "self._check_flags()\n" ]
[ "def check_for_setup_error(self):...\n", "\"\"\"docstring\"\"\"\n", "self._check_flags()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_37(self, VAR_16, VAR_21=None):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.model.meta import get_field_precision\n", "if VAR_21 and not isinstance(VAR_21, string_types):\n", "VAR_21 = VAR_21.parentfield\n", "VAR_45 = VAR_21 or 'main'\n", "if not hasattr(self, '_precision'):\n", "self._pre...
[ "def precision(self, fieldname, parentfield=None):...\n", "\"\"\"docstring\"\"\"\n", "from frappe.model.meta import get_field_precision\n", "if parentfield and not isinstance(parentfield, string_types):\n", "parentfield = parentfield.parentfield\n", "cache_key = parentfield or 'main'\n", "if not hasattr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "ImportFrom'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_6(self, VAR_45):...\n", "" ]
[ "def run(self, uh):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_9 = 'SELECT tid FROM tids'\n", "self.query(VAR_9)\n", "return [i[0] for i in self.c.fetchall()]\n" ]
[ "def get_tids_with_tag(self):...\n", "\"\"\"docstring\"\"\"\n", "q = 'SELECT tid FROM tids'\n", "self.query(q)\n", "return [i[0] for i in self.c.fetchall()]\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "def __init__(self, *VAR_1, **VAR_2):...\n", "super(CLASS_0, self).__init__(*VAR_1, **kwargs)\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(BooleanField, self).__init__(*args, **kwargs)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@staticmethod...\n", "VAR_38 = os.path.join(VAR_5, VAR_1)\n", "VAR_67 = VAR_7.classname if PY3 else VAR_7.classname.decode('utf-8')\n", "f.write(VAR_67)\n" ]
[ "@staticmethod...\n", "javac_plugin_info_file = os.path.join(resources_dir, _JAVAC_PLUGIN_INFO_FILE)\n", "classname = (javac_plugin_target.classname if PY3 else javac_plugin_target.\n classname.decode('utf-8'))\n", "f.write(classname)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_5(VAR_13):...\n", "return re.sub('{(.*)}', '{\\\\1:[^/\\\\.]+}', VAR_13)\n" ]
[ "def append_format_pattern(route):...\n", "return re.sub('{(.*)}', '{\\\\1:[^/\\\\.]+}', route)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(VAR_39, VAR_40, VAR_41, VAR_42, VAR_48, VAR_43, VAR_44, VAR_45,...\n", "VAR_39.returncode = None\n", "VAR_39._out_file = VAR_7.path.join(self.root_dir, 'work',\n 'task_runner_out.json')\n", "VAR_6 = [sys.executable, bot_main.THIS_FILE, 'task_runner',\n '--swarming-server', VAR_3, '--in-fil...
[ "def __init__(self2, cmd, detached, cwd, env, stdout, stderr, stdin, close_fds):...\n", "self2.returncode = None\n", "self2._out_file = os.path.join(self.root_dir, 'work', 'task_runner_out.json')\n", "expected = [sys.executable, bot_main.THIS_FILE, 'task_runner',\n '--swarming-server', url, '--in-file', os...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@contextmanager...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = str(uuid.uuid4())\n", "def FUNC_27(VAR_8):...\n", "return '{}#{}'.format(VAR_7, VAR_8)\n" ]
[ "@contextmanager...\n", "\"\"\"docstring\"\"\"\n", "uuid_str = str(uuid.uuid4())\n", "def u(string):...\n", "return '{}#{}'.format(uuid_str, string)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "FunctionDef'", "Return'" ]
[ "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_0(VAR_0, VAR_1=None, VAR_2=False):...\n", "VAR_3 = None\n", "if conf.eString and conf.eString in VAR_0:\n", "VAR_4 = VAR_0.index(conf.eString)\n", "if conf.eRegexp:\n", "VAR_5 = len(conf.eString)\n", "VAR_3 = re.findall(conf.eRegexp, VAR_0, re.I | re.M)\n", "if conf.string:\n", "VAR_6 = VA...
[ "def comparison(page, headers=None, getSeqMatcher=False):...\n", "regExpResults = None\n", "if conf.eString and conf.eString in page:\n", "index = page.index(conf.eString)\n", "if conf.eRegexp:\n", "length = len(conf.eString)\n", "regExpResults = re.findall(conf.eRegexp, page, re.I | re.M)\n", "if con...
[ 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, 2, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Condition", "AugAssign'", "For", "Return'", "Return'", "Condition", "Expr'", "Assign'", "Assign'", "Return'", "Return'", "Condition", ...
[ "@app.route('/people/new/')...\n", "if not current_user.editor:\n", "return redirect(url_for('error403'))\n", "VAR_2 = NameForm()\n", "return render_template('/people/new.html', VAR_2=form)\n" ]
[ "@app.route('/people/new/')...\n", "if not current_user.editor:\n", "return redirect(url_for('error403'))\n", "form = NameForm()\n", "return render_template('/people/new.html', form=form)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Assign'", "Return'" ]
[ "from __future__ import unicode_literals\n", "from django.db import models, migrations\n", "import django.core.validators\n", "VAR_0 = [('course', '0005_auto_20150625_1835')]\n", "VAR_1 = [migrations.CreateModel(name='CourseChapter', fields=[('id', models\n .AutoField(auto_created=True, primary_key=True,...
[ "from __future__ import unicode_literals\n", "from django.db import models, migrations\n", "import django.core.validators\n", "dependencies = [('course', '0005_auto_20150625_1835')]\n", "operations = [migrations.CreateModel(name='CourseChapter', fields=[('id',\n models.AutoField(auto_created=True, primar...
[ 0, 0, 0, 0, 4 ]
[ "ImportFrom'", "ImportFrom'", "Import'", "Assign'", "Assign'" ]
[ "@VAR_0.route('/login', methods=['GET', 'POST'])...\n", "if request.method == 'POST':\n", "VAR_5 = CLASS_0(request.form['email'], request.form['password'])\n", "return render_template('login.html')\n", "VAR_1.session.add(VAR_5)\n", "VAR_1.session.commit()\n", "return redirect(url_for('tables'))\n" ]
[ "@app.route('/login', methods=['GET', 'POST'])...\n", "if request.method == 'POST':\n", "user = User(request.form['email'], request.form['password'])\n", "return render_template('login.html')\n", "db.session.add(user)\n", "db.session.commit()\n", "return redirect(url_for('tables'))\n" ]
[ 0, 0, 4, 0, 4, 4, 4 ]
[ "Condition", "Condition", "Assign'", "Return'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_8(VAR_15, VAR_16=None, VAR_17=None):...\n", "VAR_34 = FUNC_0()\n", "return VAR_34.do_request(VAR_6 + VAR_15, VAR_16, VAR_17)\n" ]
[ "def admin_req(path, args=None, files=None):...\n", "browser = get_aws_browser()\n", "return browser.do_request(AWS_BASE_URL + path, args, files)\n" ]
[ 0, 0, 5 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@property...\n", "return self.get_options().version\n" ]
[ "@property...\n", "return self.get_options().version\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_1(VAR_1, VAR_2, VAR_3='NGTREE', VAR_4=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'CSV', 'TREE', 'JSON', 'YAML', 'NGTREE'\n", "if VAR_3 in VAR_11:\n", "VAR_21, VAR_22, VAR_19 = None, None, None\n", "if re.search('^\\\\d+\\\\.\\\\d+\\\\.\\\\d+\\\\.\\\\d+$', VAR_1):\n", "VAR_21 = nglib.q...
[ "def get_full_routed_path(src, dst, rtype='NGTREE', l2path=False):...\n", "\"\"\"docstring\"\"\"\n", "rtypes = 'CSV', 'TREE', 'JSON', 'YAML', 'NGTREE'\n", "if rtype in rtypes:\n", "srct, dstt, ngtree = None, None, None\n", "if re.search('^\\\\d+\\\\.\\\\d+\\\\.\\\\d+\\\\.\\\\d+$', src):\n", "srct = ngli...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Condition", "Condition", "Assign'", "Condition", "Condition"...
[ "def FUNC_4(self):...\n", "VAR_15 = {'Content-Type': 'application/golang'}\n", "VAR_14 = self.new_mocked_client(client.RESTClient, VAR_15=default_headers,\n url_prefix='/v1/api')\n", "VAR_14.list()\n", "FUNC_1('get', VAR_14, 'https://1.2.3.4/v1/api', VAR_9=_headers(**\n default_headers))\n", "VAR_14...
[ "def test_client_headers(self):...\n", "default_headers = {'Content-Type': 'application/golang'}\n", "api = self.new_mocked_client(client.RESTClient, default_headers=\n default_headers, url_prefix='/v1/api')\n", "api.list()\n", "assert_call('get', api, 'https://1.2.3.4/v1/api', headers=_headers(**\n d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "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'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.create_snapshot(VAR_8)\n", "self.common.client_logout()\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.create_snapshot(snapshot)\n", "self.common.client_logout()\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_3(VAR_2):...\n", "if not VAR_2:\n", "return []\n", "VAR_9 = []\n", "VAR_10 = frappe.db.get_value('Department', {'name': VAR_2}, ['lft', 'rgt'],\n as_dict=True)\n", "VAR_11 = frappe.db.sql(\n \"\"\"select name from `tabDepartment`\n\t\twhere lft >= %s and rgt <= %s order by lft desc\n\t\t\"...
[ "def get_approvers(department):...\n", "if not department:\n", "return []\n", "approvers = []\n", "department_details = frappe.db.get_value('Department', {'name': department},\n ['lft', 'rgt'], as_dict=True)\n", "department_list = frappe.db.sql(\n \"\"\"select name from `tabDepartment`\n\t\twhere lf...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_17 = VAR_4\n", "VAR_18 = VAR_17.values[0].num / VAR_17.values[0].den\n", "VAR_19 = VAR_17.values[1].num / VAR_17.values[1].den / 60\n", "VAR_20 = VAR_17.values[2].num / VAR_17.values[2].den / 3600\n", "if VAR_5 in 'WS':\n", "return -(VAR_18 + VAR_1...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "ag = angular_distance\n", "degrees = ag.values[0].num / ag.values[0].den\n", "minutes = ag.values[1].num / ag.values[1].den / 60\n", "seconds = ag.values[2].num / ag.values[2].den / 3600\n", "if reference in 'WS':\n", "return -(degrees + minutes + seco...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_14(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "return partial(FUNC_5, VAR_1)\n" ]
[ "def make_token_getter(remote):...\n", "\"\"\"docstring\"\"\"\n", "return partial(token_getter, remote)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@staticmethod...\n", "return FUNC_1(CLASS_0.PostDataToHandlerAsync(VAR_9, VAR_7, VAR_10))\n" ]
[ "@staticmethod...\n", "return JsonFromFuture(BaseRequest.PostDataToHandlerAsync(data, handler,\n timeout))\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_36(VAR_11):...\n", "for VAR_51, VAR_58 in VAR_11.items():\n", "if isinstance(VAR_58, str) or not isinstance(VAR_58, Iterable):\n", "VAR_58 = [VAR_58]\n", "yield [(VAR_51, VAR_16) for VAR_16 in VAR_58]\n" ]
[ "def flatten(wildcards):...\n", "for wildcard, values in wildcards.items():\n", "if isinstance(values, str) or not isinstance(values, Iterable):\n", "values = [values]\n", "yield [(wildcard, value) for value in values]\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Assign'", "Expr'" ]
[ "def FUNC_12():...\n", "VAR_18 = requests.get(FUNC_2('healthy'))\n", "VAR_18.raise_for_status()\n", "return VAR_18.json()\n" ]
[ "def _ServerIsHealthy():...\n", "response = requests.get(_BuildUri('healthy'))\n", "response.raise_for_status()\n", "return response.json()\n" ]
[ 0, 7, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "@integration_synonym_api...\n", "FUNC_2(VAR_2)\n", "FUNC_3(VAR_2, 'FINGER LIMATED', VAR_7='1')\n", "FUNC_5(VAR_4, VAR_5, VAR_11='SUN LIMITED', VAR_10=[{'name': '----SUN'}])\n" ]
[ "@integration_synonym_api...\n", "clean_database(solr)\n", "seed_database_with(solr, 'FINGER LIMATED', id='1')\n", "verify_results(client, jwt, query='SUN LIMITED', expected=[{'name': '----SUN'}]\n )\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "@login_required()...\n", "VAR_5 = {}\n", "VAR_6, VAR_7 = FUNC_5(**kwargs)\n", "VAR_5['concept'] = VAR_6\n", "VAR_4 = VAR_6.transaction\n", "if VAR_4.closed:\n", "return redirect('message', message=gettext('Transaction Closed'))\n", "VAR_5['transaction'] = VAR_4\n", "VAR_5['header'] = gettext('Delet...
[ "@login_required()...\n", "extra_context = {}\n", "concept, concept_form = get_concept_and_form_from_kwargs(**kwargs)\n", "extra_context['concept'] = concept\n", "transaction = concept.transaction\n", "if transaction.closed:\n", "return redirect('message', message=gettext('Transaction Closed'))\n", "e...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Assign'", "Return'" ]
[ "@click.command(help='List monitors')...\n", "VAR_36 = newrelic.get_monitors(VAR_0.obj['ACCOUNT'])\n", "if VAR_11:\n", "print(json.dumps(VAR_36))\n", "if VAR_15:\n", "return\n", "for VAR_12 in VAR_36:\n", "VAR_24 = [['#', 'H', 'S', 'Name', 'ID', 'Success\\nRate', 'Avg Size',\n \"\"\"Load time\n(50t...
[ "@click.command(help='List monitors')...\n", "monitors = newrelic.get_monitors(ctx.obj['ACCOUNT'])\n", "if raw:\n", "print(json.dumps(monitors))\n", "if ids_only:\n", "return\n", "for monitor in monitors:\n", "data = [['#', 'H', 'S', 'Name', 'ID', 'Success\\nRate', 'Avg Size',\n \"\"\"Load time\n(5...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Condition", "Return'", "For", "Assign'", "Expr'", "Return'", "For", "Assign'", "For", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Fo...
[ "def FUNC_11(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name}\n", "self.stubs.Set(self.driver, '_get_iscsi_properties', self.\n _fake_get_iscsi_properties)\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'acce...
[ "def test_initialize_connection(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name}\n", "self.stubs.Set(self.driver, '_get_iscsi_properties', self.\n _fake_get_iscsi_properties)\n", "self.driver._eql_execute('volume', 'select', ...
[ 0, 0, 0, 0, 2, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@VAR_1.route('/restaurants/<saltiness>/<sweetness>/<sourness>/<bitterness>/')...\n", "\"\"\"docstring\"\"\"\n", "VAR_0.info('GET query_restaurants_by_taste query')\n", "VAR_11, VAR_12, VAR_13, VAR_14 = int(VAR_11), int(VAR_12), int(VAR_13), int(\n VAR_14)\n", "return None\n", "VAR_27 = sql_queries.res...
[ "@app.route('/restaurants/<saltiness>/<sweetness>/<sourness>/<bitterness>/')...\n", "\"\"\"docstring\"\"\"\n", "logger.info('GET query_restaurants_by_taste query')\n", "saltiness, sweetness, sourness, bitterness = int(saltiness), int(sweetness\n ), int(sourness), int(bitterness)\n", "return None\n", "r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_18 = self.common.create_volume(VAR_6)\n", "self.common.client_logout()\n", "return {'metadata': VAR_18}\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "metadata = self.common.create_volume(volume)\n", "self.common.client_logout()\n", "return {'metadata': metadata}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_11(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n", "self.write_data({'type': 'torrent_info_updated', 'event': dict(infohash=\n hexlify(objectID), **args[0])})\n" ]
[ "def on_torrent_info_updated(self, subject, changetype, objectID, *args):...\n", "self.write_data({'type': 'torrent_info_updated', 'event': dict(infohash=\n hexlify(objectID), **args[0])})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_7(self):...\n", "VAR_23 = []\n", "VAR_25, VAR_26, VAR_27 = self._first_missing()\n", "if VAR_25:\n", "VAR_23.append(f'missing step {VAR_25} {VAR_26} for path ')\n", "VAR_23.append(f'<{type(self._r_root_item_).__name__}>')\n", "VAR_23 += [VAR_31 for VAR_31, VAR_27 in self._r_steps_]\n", "if V...
[ "def description(self):...\n", "result = []\n", "first_missing_index, first_missing_desc, _ = self._first_missing()\n", "if first_missing_index:\n", "result.append(\n f'missing step {first_missing_index} {first_missing_desc} for path ')\n", "result.append(f'<{type(self._r_root_item_).__name__}>')\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "AugAssign'", "Condition", "Assign'", "Return'", "Condition", "Expr'", "Assign'", "Condition", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_0(self, VAR_1, VAR_6, VAR_7, VAR_3):...\n", "VAR_12 = []\n", "if VAR_7 == True:\n", "VAR_7 = 'TRUE'\n", "if VAR_7 == False:\n", "for choice, VAR_19 in [('', _('(unspecified)')), ('TRUE', _('yes')), (\n", "VAR_7 = 'FALSE'\n", "VAR_7 = ''\n", "VAR_17 = VAR_7 == choice and 'selected' or ''\n"...
[ "def make_input(self, version, name, value, attribute):...\n", "options = []\n", "if value == True:\n", "value = 'TRUE'\n", "if value == False:\n", "for choice, title in [('', _('(unspecified)')), ('TRUE', _('yes')), (\n", "value = 'FALSE'\n", "value = ''\n", "selected = value == choice and 'selecte...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "For", "Assign'", "Assign'", "Assign'", "Return'", "Expr'" ]
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_7 = Container.objects.create(owner=User.objects.get(username='autotest'\n ), app=App.objects.get(id=app_i...
[ "def test_container_state_good(self):...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "c = Container.objects.create(owner=User.objects.get(username='autotest'),\n app=App....
[ 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@rt.switch_runtime(fixtures.TEST_SITE_CONFIG, 'sys0')...\n", "VAR_40 = self.create_test('t0')\n", "VAR_41 = self.create_test('t1')\n", "VAR_42 = self.create_test('t2')\n", "VAR_43 = self.create_test('t3')\n", "VAR_44 = self.create_test('t4')\n", "VAR_41.depends_on('t0')\n", "VAR_42.depends_on('t1')\n...
[ "@rt.switch_runtime(fixtures.TEST_SITE_CONFIG, 'sys0')...\n", "t0 = self.create_test('t0')\n", "t1 = self.create_test('t1')\n", "t2 = self.create_test('t2')\n", "t3 = self.create_test('t3')\n", "t4 = self.create_test('t4')\n", "t1.depends_on('t0')\n", "t2.depends_on('t1')\n", "t3.depends_on('t1')\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "from __future__ import unicode_literals\n", "from django.db import models, migrations\n", "VAR_0 = [('exercise', '0006_auto_20150625_1823'), ('course',\n '0005_auto_20150625_1835'), ('deviations', '0001_initial')]\n", "VAR_1 = [migrations.AlterField(model_name='learningobject', name='category',\n field...
[ "from __future__ import unicode_literals\n", "from django.db import models, migrations\n", "dependencies = [('exercise', '0006_auto_20150625_1823'), ('course',\n '0005_auto_20150625_1835'), ('deviations', '0001_initial')]\n", "operations = [migrations.AlterField(model_name='learningobject', name=\n 'cat...
[ 0, 0, 0, 4 ]
[ "ImportFrom'", "ImportFrom'", "Assign'", "Assign'" ]
[ "\"\"\"\nworkflow worker daemon\n\"\"\"\n", "import json\n", "import traceback\n", "from pprint import pformat\n", "import signal\n", "from time import sleep, time\n", "import pika\n", "from tornado.escape import json_decode\n", "from pyoko.conf import settings\n", "from pyoko.lib.utils import get...
[ "\"\"\"\nworkflow worker daemon\n\"\"\"\n", "import json\n", "import traceback\n", "from pprint import pformat\n", "import signal\n", "from time import sleep, time\n", "import pika\n", "from tornado.escape import json_decode\n", "from pyoko.conf import settings\n", "from pyoko.lib.utils import get...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0 ]
[ "Expr'", "Import'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "Assign'", "Assign'", "Assign'",...
[ "def FUNC_0(VAR_0):...\n", "VAR_1 = Template(filename='r2/templates/showmeetup.html', output_encoding=\n 'utf-8', encoding_errors='replace')\n", "VAR_2 = VAR_1.get_def('meetup_info').render_unicode(VAR_0=meetup)\n", "VAR_3 = url_for(controller='meetups', action='show', id=meetup._id36)\n", "VAR_4 = pytho...
[ "def meetup_article_text(meetup):...\n", "t = Template(filename='r2/templates/showmeetup.html', output_encoding=\n 'utf-8', encoding_errors='replace')\n", "res = t.get_def('meetup_info').render_unicode(meetup=meetup)\n", "url = url_for(controller='meetups', action='show', id=meetup._id36)\n", "title = py...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_15(VAR_27):...\n", "VAR_46 = str(VAR_27.body).lower()\n", "print('Body: **', VAR_46, '**')\n", "if VAR_27.body[0] == ' ':\n", "VAR_28 = str(VAR_27.body[1:]).lower().replace('\\\\', '').split('\\n')[0].split(\n ' ')\n", "VAR_28 = str(VAR_27.body).lower().replace('\\\\', '').split('\\n')[0].spl...
[ "def handle_message(message):...\n", "message_body = str(message.body).lower()\n", "print('Body: **', message_body, '**')\n", "if message.body[0] == ' ':\n", "parsed_text = str(message.body[1:]).lower().replace('\\\\', '').split('\\n')[0\n ].split(' ')\n", "parsed_text = str(message.body).lower().repla...
[ 0, 4, 4, 0, 0, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ]
[ "FunctionDef'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'"...
[ "def FUNC_11(self):...\n", "VAR_3 = 5\n", "for i in range(VAR_3):\n", "VAR_11 = urllib.urlencode({url_helper.swarm_constants.COUNT_KEY: i})\n", "self._mox.ReplayAll()\n", "url_helper.urllib2.urlopen(mox.IgnoreArg(), VAR_11, timeout=mox.IgnoreArg()\n ).AndRaise(urllib2.URLError('url'))\n", "self.asser...
[ "def testEnsureCountKeyIncludedInOpen(self):...\n", "attempts = 5\n", "for i in range(attempts):\n", "encoded_data = urllib.urlencode({url_helper.swarm_constants.COUNT_KEY: i})\n", "self._mox.ReplayAll()\n", "url_helper.urllib2.urlopen(mox.IgnoreArg(), encoded_data, timeout=mox.\n IgnoreArg()).AndRaise...
[ 0, 0, 0, 0, 0, 5, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_3):...\n", "return VAR_3\n" ]
[ "def run(self, x):...\n", "return x\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1):...\n", "return chain(*map(attrgetter(VAR_1), VAR_0))\n" ]
[ "def jobfiles(jobs, type):...\n", "return chain(*map(attrgetter(type), jobs))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_24 = self.getfile(VAR_21, VAR_23=True)\n", "if VAR_24 is not False:\n", "return True\n" ]
[ "def exists(self, path):...\n", "\"\"\"docstring\"\"\"\n", "f = self.getfile(path, follow_symlinks=True)\n", "if f is not False:\n", "return True\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "def FUNC_16(self, VAR_15):...\n", "\"\"\"docstring\"\"\"\n", "for o in self.products:\n", "if o.match(VAR_15):\n", "return False\n", "return True\n" ]
[ "def is_producer(self, requested_output):...\n", "\"\"\"docstring\"\"\"\n", "for o in self.products:\n", "if o.match(requested_output):\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Return'", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_4 = [self.program]\n", "VAR_4.extend(self.arguments)\n", "VAR_5 = subprocess.run(VAR_4, stdin=subprocess.PIPE, stdout=subprocess.PIPE)\n", "return {'exit_code': VAR_5.returncode, 'stdout': VAR_5.stdout.decode() if\n VAR_5.stdout else None, 'stderr': VAR_5.stderr.decode() if...
[ "def run(self):...\n", "args = [self.program]\n", "args.extend(self.arguments)\n", "result = subprocess.run(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)\n", "return {'exit_code': result.returncode, 'stdout': result.stdout.decode() if\n result.stdout else None, 'stderr': result.stderr.decode() if ...
[ 0, 0, 0, 2, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "@VAR_0.route('/', methods=['GET'])...\n", "\"\"\"docstring\"\"\"\n", "if request.method == 'GET':\n", "VAR_21 = uuid4()\n", "return render_template('index.html', VAR_21=cache_id)\n" ]
[ "@app.route('/', methods=['GET'])...\n", "\"\"\"docstring\"\"\"\n", "if request.method == 'GET':\n", "cache_id = uuid4()\n", "return render_template('index.html', cache_id=cache_id)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "Return'" ]
[ "def FUNC_7(self):...\n", "return self.content\n" ]
[ "def read(self):...\n", "return self.content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_14(self, VAR_14):...\n", "" ]
[ "def is_boolean(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_10(self):...\n", "if not self.is_ordered():\n", "if self.query_order:\n", "if self.current_columns_length > 1:\n", "return self.get_url_with_query_params({self.ordering_query_param: '{}.{}'.\n format(self.column_id, self.query_order)})\n", "return self.get_url_with_query_params({self.ordering...
[ "def get_add_sort_by(self):...\n", "if not self.is_ordered():\n", "if self.query_order:\n", "if self.current_columns_length > 1:\n", "return self.get_url_with_query_params({self.ordering_query_param: '{}.{}'.\n format(self.column_id, self.query_order)})\n", "return self.get_url_with_query_params({self....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Condition", "Return'", "Return'", "Assign'", "Return'", "For", "Assign'", "Condition", "Condition", "Return'", "Return'", "Expr'" ]
[ "def FUNC_3(self):...\n", "VAR_1 = list(self.uut.process_output([\n \"Random line that shouldn't be captured\\n\", '*************\\n'],\n 'a/file.py', ['original_file_lines_placeholder']))\n", "self.assertEqual(len(VAR_1), 0)\n" ]
[ "def test_valid_output(self):...\n", "out = list(self.uut.process_output([\n \"Random line that shouldn't be captured\\n\", '*************\\n'],\n 'a/file.py', ['original_file_lines_placeholder']))\n", "self.assertEqual(len(out), 0)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "from flask import jsonify, request\n", "from . import api\n", "from run import mysql\n", "@api.route('/items', methods=['GET'])...\n", "VAR_1 = 'SELECT id, name_enus from tblDBCItem where auctionable = true;'\n", "VAR_2 = mysql.connection.cursor()\n", "VAR_2.execute(VAR_1)\n", "VAR_3 = VAR_2.fetchall...
[ "from flask import jsonify, request\n", "from . import api\n", "from run import mysql\n", "@api.route('/items', methods=['GET'])...\n", "sql = 'SELECT id, name_enus from tblDBCItem where auctionable = true;'\n", "cursor = mysql.connection.cursor()\n", "cursor.execute(sql)\n", "data = cursor.fetchall()...
[ 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "For", "Assign'", "Return'", "For", "Assign'", "Expr'" ]
[ "import sqlite3\n", "import sys\n", "from recipe import *\n", "def __init__(self):...\n", "VAR_2 = sqlite3.connect('brewdie.db')\n", "if VAR_2:\n", "if VAR_2:\n", "def FUNC_0(self, VAR_0):...\n", "VAR_3 = VAR_2.cursor()\n", "VAR_2.rollback()\n", "VAR_2.close()\n", "VAR_2 = sqlite3.connect('bre...
[ "import sqlite3\n", "import sys\n", "from recipe import *\n", "def __init__(self):...\n", "connection = sqlite3.connect('brewdie.db')\n", "if connection:\n", "if connection:\n", "def store_recipe(self, recipe):...\n", "cursor = connection.cursor()\n", "connection.rollback()\n", "connection.close...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4, 0, 0, 4, 0...
[ "Import'", "Import'", "ImportFrom'", "FunctionDef'", "Assign'", "Condition", "Condition", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Condition", "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "For", "Assign'", "Conditi...
[ "def __init__(self, VAR_3, VAR_4):...\n", "self._user_id = VAR_3\n", "self._leap_home = VAR_4\n", "self._uuid = str(VAR_1.uuid4())\n", "self._mail_address = '%s@pixelated.org' % VAR_3\n", "self._soledad = None\n", "self._services = None\n" ]
[ "def __init__(self, user_id, leap_home):...\n", "self._user_id = user_id\n", "self._leap_home = leap_home\n", "self._uuid = str(uuid.uuid4())\n", "self._mail_address = '%s@pixelated.org' % user_id\n", "self._soledad = None\n", "self._services = None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "@staticmethod...\n", "VAR_2 = VAR_2.replace('A', 'Ā', VAR_1)\n", "VAR_2 = VAR_2.replace('A', 'Ă', VAR_1)\n", "VAR_2 = VAR_2.replace('A', 'Ą', VAR_1)\n", "VAR_2 = VAR_2.replace('a', 'α', VAR_1)\n", "VAR_2 = VAR_2.replace('e', 'е', VAR_1)\n", "VAR_2 = VAR_2.replace('a', 'а', VAR_1)\n", "VAR_2 = VAR_2.r...
[ "@staticmethod...\n", "s = s.replace('A', 'Ā', cnt)\n", "s = s.replace('A', 'Ă', cnt)\n", "s = s.replace('A', 'Ą', cnt)\n", "s = s.replace('a', 'α', cnt)\n", "s = s.replace('e', 'е', cnt)\n", "s = s.replace('a', 'а', cnt)\n", "s = s.replace('e', 'ё', cnt)\n", "s = s.replace('o', 'о', cnt)\n", "ret...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_18, *VAR_15, **VAR_16):...\n", "CLASS_3.__init__(self, VAR_18, errors.BAD_USERNAME, *VAR_15, **kw)\n" ]
[ "def __init__(self, item, *a, **kw):...\n", "VRequired.__init__(self, item, errors.BAD_USERNAME, *a, **kw)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_17(self, VAR_18):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', VAR_18['volume_name'], 'snapshot',\n 'delete', VAR_18['name'])\n", "VAR_0.error(_('Failed to delete snapshot %(snap)s of volume %(vol)s'), {\n 'snap': VAR_18['name'], 'vol': VAR_18['volume_name']})\n" ]
[ "def delete_snapshot(self, snapshot):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', snapshot['volume_name'], 'snapshot',\n 'delete', snapshot['name'])\n", "LOG.error(_('Failed to delete snapshot %(snap)s of volume %(vol)s'), {\n 'snap': snapshot['name'], 'vol': snapshot['volum...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def FUNC_22(self):...\n", "\"\"\"docstring\"\"\"\n", "tournament.registerPlayer(VAR_1='James')\n" ]
[ "def test_name_first_and_last(self):...\n", "\"\"\"docstring\"\"\"\n", "tournament.registerPlayer(player_name='James')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.config['cluster_options']:\n", "for opt in self.config['cluster_options']:\n", "VAR_32 = False\n", "for option in self.clusters[opt.cluster].options:\n", "if opt.name == option.name:\n", "if not VAR_32:\n", "VAR_32 = True\n", "self._exi...
[ "def _parse_options(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.config['cluster_options']:\n", "for opt in self.config['cluster_options']:\n", "match = False\n", "for option in self.clusters[opt.cluster].options:\n", "if opt.name == option.name:\n", "if not match:\n", "match = True\n", "self...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "For", "Assign'", "For", "Condition", "Condition", "Assign'", "Expr'", "Assign'" ]
[ "def FUNC_0(VAR_2='cert_db.sqlite3'):...\n", "" ]
[ "def create_connection(db_name='cert_db.sqlite3'):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@VAR_1.route('/upload', methods=['POST'])...\n", "if not 'email' in VAR_18 and not 'social' in VAR_18:\n", "return '', 401\n", "if 'email' in VAR_18:\n", "VAR_12 = VAR_18['email']\n", "if 'social' in VAR_18:\n", "VAR_11 = request.files['file']\n", "VAR_12 = VAR_18['social']\n", "VAR_4 = ''\n", "i...
[ "@app.route('/upload', methods=['POST'])...\n", "if not 'email' in session and not 'social' in session:\n", "return '', 401\n", "if 'email' in session:\n", "email = session['email']\n", "if 'social' in session:\n", "file = request.files['file']\n", "email = session['social']\n", "filename = ''\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Expr'", "Expr'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_1():...\n", "from optparse import OptionParser\n", "VAR_15 = OptionParser(VAR_0=usage)\n", "VAR_15.add_option('-v', '--verbose', default=0, action='count', help=\n 'Increment test verbosity (can be used multiple times)')\n", "VAR_15.add_option('-d', '--debug', action='store_true', default=False...
[ "def main():...\n", "from optparse import OptionParser\n", "parser = OptionParser(usage=usage)\n", "parser.add_option('-v', '--verbose', default=0, action='count', help=\n 'Increment test verbosity (can be used multiple times)')\n", "parser.add_option('-d', '--debug', action='store_true', default=False, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "@handler.post(handler.JSON, handler.JSON)...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = self.request.get('idToken')\n", "VAR_2 = datetime.timedelta(days=SESSION_EXPIRY_DAYS)\n", "VAR_4 = auth.create_session_cookie(VAR_1, VAR_2)\n", "VAR_3 = datetime.datetime.now() + VAR_2\n", "self.response.set_cookie('se...
[ "@handler.post(handler.JSON, handler.JSON)...\n", "\"\"\"docstring\"\"\"\n", "id_token = self.request.get('idToken')\n", "expires_in = datetime.timedelta(days=SESSION_EXPIRY_DAYS)\n", "session_cookie = auth.create_session_cookie(id_token, expires_in)\n", "expires = datetime.datetime.now() + expires_in\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@handled_slot(bool)...\n", "self.log_area.clear()\n" ]
[ "@handled_slot(bool)...\n", "self.log_area.clear()\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]