lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def __init__(self):...\n",
"self._time = 0.0\n"
] | [
"def __init__(self):...\n",
"self._time = 0.0\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_26(*VAR_29, **VAR_30):...\n",
""
] | [
"def raiseOSError(*_a, **_k):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_3(self):...\n",
"VAR_4 = CLASS_2()\n",
"VAR_5 = EntityCache(entities=[], allow_none_id=False)\n",
"self.assert_raises(ValueError, VAR_5.add, VAR_4)\n"
] | [
"def test_allow_none_id_false(self):...\n",
"ent = MyEntity()\n",
"cache = EntityCache(entities=[], allow_none_id=False)\n",
"self.assert_raises(ValueError, cache.add, ent)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_19(self, VAR_14):...\n",
"\"\"\"docstring\"\"\"\n",
"for retries in range(1, 100):\n",
"if os.path.exists('/sys/bus/vmbus/devices/'):\n",
"return super(CLASS_0, self).device_for_ide_port(VAR_14)\n",
"time.sleep(10)\n"
] | [
"def device_for_ide_port(self, port_id):...\n",
"\"\"\"docstring\"\"\"\n",
"for retries in range(1, 100):\n",
"if os.path.exists('/sys/bus/vmbus/devices/'):\n",
"return super(BigIpOSUtil, self).device_for_ide_port(port_id)\n",
"time.sleep(10)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"For",
"Condition",
"Return'",
"Expr'"
] |
[
"def FUNC_8(self, VAR_47, VAR_48):...\n",
"\"\"\"docstring\"\"\"\n",
"assert isinstance(VAR_47, list)\n",
"assert isinstance(VAR_48, dict)\n",
"assert self.validate_group_by_data(VAR_47, VAR_48), 'Invalid having data'\n",
"if len(VAR_47) == 0:\n",
"return ''\n",
"VAR_71 = ''\n",
"VAR_72 = map(lambda... | [
"def generate_group_by(self, group_by_fields, having_clause):...\n",
"\"\"\"docstring\"\"\"\n",
"assert isinstance(group_by_fields, list)\n",
"assert isinstance(having_clause, dict)\n",
"assert self.validate_group_by_data(group_by_fields, having_clause\n ), 'Invalid having data'\n",
"if len(group_by_fi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assert'",
"Assert'",
"Assert'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"AugAssign'",
"Condition",
"AugAssign'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"self.telnet = Telnet(self.options.debugger_ip_address, self.port, timeout=\n self.timeout)\n",
"db.log_event('Information', 'Debugger', 'Connected to telnet', self.options\n .debugger_ip_address + ':' + str(self.port))\n"
] | [
"def connect_telnet(self):...\n",
"self.telnet = Telnet(self.options.debugger_ip_address, self.port, timeout=\n self.timeout)\n",
"db.log_event('Information', 'Debugger', 'Connected to telnet', self.options\n .debugger_ip_address + ':' + str(self.port))\n"
] | [
0,
0,
2
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def __gt__(self, VAR_11):...\n",
"return self.rule.__gt__(VAR_11.rule)\n"
] | [
"def __gt__(self, other):...\n",
"return self.rule.__gt__(other.rule)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_4(self, VAR_2):...\n",
"if self == VAR_2:\n",
"if VAR_2 not in self.child_groups:\n",
"self.child_groups.append(VAR_2)\n",
"VAR_2.depth = max([self.depth + 1, VAR_2.depth])\n",
"VAR_2._check_children_depth()\n",
"if self.name not in [VAR_12.name for VAR_12 in VAR_2.parent_groups]:\n",
"VAR_2... | [
"def add_child_group(self, group):...\n",
"if self == group:\n",
"if group not in self.child_groups:\n",
"self.child_groups.append(group)\n",
"group.depth = max([self.depth + 1, group.depth])\n",
"group._check_children_depth()\n",
"if self.name not in [g.name for g in group.parent_groups]:\n",
"group.... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1
] | [
"FunctionDef'",
"Condition",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"For",
"Expr'",
"Expr'",
"For",
"Expr'"
] |
[
"def FUNC_6(self, VAR_3):...\n",
"if VAR_3.name not in self.host_names:\n",
"self.hosts.append(VAR_3)\n",
"self._hosts.add(VAR_3.name)\n",
"VAR_3.add_group(self)\n",
"self.clear_hosts_cache()\n"
] | [
"def add_host(self, host):...\n",
"if host.name not in self.host_names:\n",
"self.hosts.append(host)\n",
"self._hosts.add(host.name)\n",
"host.add_group(self)\n",
"self.clear_hosts_cache()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.get_options().incremental_caching\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.get_options().incremental_caching\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_0(VAR_0, VAR_1=None, VAR_2=None):...\n",
"if VAR_2 is None:\n",
"VAR_2 = VAR_0.dataset\n",
"VAR_3 = db.build_dict_from_row(VAR_2)\n",
"VAR_3['version'] = db.build_dict_from_row(VAR_0)\n",
"VAR_3['version']['available_from'] = VAR_3['version']['available_from'\n ].strftime('%Y-%m-%d')\n",
"V... | [
"def build_dataset_structure(dataset_version, user=None, dataset=None):...\n",
"if dataset is None:\n",
"dataset = dataset_version.dataset\n",
"r = db.build_dict_from_row(dataset)\n",
"r['version'] = db.build_dict_from_row(dataset_version)\n",
"r['version']['available_from'] = r['version']['available_from... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'"
] |
[
"def __repr__(self):...\n",
"return self.get_name()\n"
] | [
"def __repr__(self):...\n",
"return self.get_name()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"from reddit_base import RedditController\n",
"from r2.lib.pages import BoringPage, ShowMeetup, NewMeetup, EditMeetup, PaneStack, CommentListing, LinkInfoPage, CommentReplyBox, NotEnoughKarmaToPost\n",
"from validator import validate, VUser, VRequired, VMeetup, VEditMeetup, VFloat, ValueOrBlank, ValidIP, VMenu,... | [
"from reddit_base import RedditController\n",
"from r2.lib.pages import BoringPage, ShowMeetup, NewMeetup, EditMeetup, PaneStack, CommentListing, LinkInfoPage, CommentReplyBox, NotEnoughKarmaToPost\n",
"from validator import validate, VUser, VRequired, VMeetup, VEditMeetup, VFloat, ValueOrBlank, ValidIP, VMenu,... | [
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
... |
[
"def FUNC_0(VAR_8, VAR_9, VAR_10, VAR_11=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_12 = VAR_8.components.netatmo\n",
"VAR_13 = CLASS_1(VAR_12.NETATMO_AUTH, VAR_9.get(VAR_2, None))\n",
"VAR_14 = []\n",
"import pyatmo\n",
"if VAR_1 in VAR_9:\n",
"return None\n",
"VAR_10(VAR_14, True)\n",
"for VA... | [
"def setup_platform(hass, config, add_devices, discovery_info=None):...\n",
"\"\"\"docstring\"\"\"\n",
"netatmo = hass.components.netatmo\n",
"data = NetAtmoData(netatmo.NETATMO_AUTH, config.get(CONF_STATION, None))\n",
"dev = []\n",
"import pyatmo\n",
"if CONF_MODULES in config:\n",
"return None\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Import'",
"Condition",
"Return'",
"Expr'",
"For",
"For",
"Condition",
"For",
"Expr'",
"For",
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_0, VAR_4=None):...\n",
"VAR_12 = []\n",
"VAR_11 = self.find_ord(VAR_0)\n",
"for node, dep, lbl in self.edges:\n",
"if VAR_4:\n",
"return VAR_12\n",
"if dep == VAR_11 and lbl == VAR_4:\n",
"if dep == VAR_11:\n",
"VAR_12.append(self.nodes[node])\n",
"VAR_12.append(self.nodes[no... | [
"def get_dependents(self, obj, label=None):...\n",
"decendents = []\n",
"this_ord = self.find_ord(obj)\n",
"for node, dep, lbl in self.edges:\n",
"if label:\n",
"return decendents\n",
"if dep == this_ord and lbl == label:\n",
"if dep == this_ord:\n",
"decendents.append(self.nodes[node])\n",
"decen... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Condition",
"Return'",
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_14(VAR_9):...\n",
"VAR_36 = []\n",
"for VAR_11 in VAR_9:\n",
"if VAR_11.name == 'start_day':\n",
"return VAR_36\n",
"VAR_36.append({'command': VAR_11.name, 'start_day': VAR_39(VAR_11.data)})\n",
"if VAR_11.name == 'number_of_days':\n",
"VAR_36.append({'command': VAR_11.name, 'number_of_days'... | [
"def get_commands(form):...\n",
"result = []\n",
"for field in form:\n",
"if field.name == 'start_day':\n",
"return result\n",
"result.append({'command': field.name, 'start_day': str(field.data)})\n",
"if field.name == 'number_of_days':\n",
"result.append({'command': field.name, 'number_of_days': fiel... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Condition",
"Return'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"For",
"Condition",
"Expr'",
"For",
"Condition",
"Expr'",
"For",
"Condition",
"Expr'",
"For",
"Expr'"
] |
[
"def FUNC_13(VAR_25):...\n",
"VAR_40 = []\n",
"if os.path.exists(VAR_25):\n",
"VAR_40 = json.loads(ocf.read())\n",
"if not isinstance(VAR_40, list):\n",
"return VAR_40\n"
] | [
"def load_list_from_json(json_file):...\n",
"json_obj = []\n",
"if os.path.exists(json_file):\n",
"json_obj = json.loads(ocf.read())\n",
"if not isinstance(json_obj, list):\n",
"return json_obj\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Return'"
] |
[
"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'"
] |
[
"def FUNC_0(VAR_0):...\n",
"VAR_5 = ConfigParser()\n",
"VAR_5.read(VAR_4)\n",
"VAR_6 = {param[0]: param[1] for param in VAR_5.items(VAR_0)}\n",
"logging.info('Loaded %d parameters for section %s', len(VAR_6), VAR_0)\n",
"return VAR_6\n"
] | [
"def read_config(section):...\n",
"parser = ConfigParser()\n",
"parser.read(CONFIG_INI)\n",
"config_params = {param[0]: param[1] for param in parser.items(section)}\n",
"logging.info('Loaded %d parameters for section %s', len(config_params), section\n )\n",
"return config_params\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_1(self, VAR_11):...\n",
""
] | [
"def _is_ipv6(self, host):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_6():...\n",
"if not request.method in VAR_0:\n",
"return True\n",
"if not request.environ.get('AUTH_TYPE') == 'cookie':\n",
"return True\n",
"if config.get('skip_authentication'):\n",
"return True\n",
"if request.environ.get('HTTP_REFERER'):\n",
"VAR_7 = urlparse(request.environ.get('HTTP_... | [
"def check():...\n",
"if not request.method in methods:\n",
"return True\n",
"if not request.environ.get('AUTH_TYPE') == 'cookie':\n",
"return True\n",
"if config.get('skip_authentication'):\n",
"return True\n",
"if request.environ.get('HTTP_REFERER'):\n",
"ref_url = urlparse(request.environ.get('HT... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
5,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Return'",
"Condition",
"AugAssign'",
"Condition",
"Condition",
"Return'"
] |
[
"def FUNC_31(self):...\n",
"if VAR_54.flags.in_install:\n",
"return\n",
"if self.meta.issingle:\n",
"return\n",
"VAR_43 = 'varchar', 'int', 'bigint'\n",
"for VAR_16, VAR_9 in iteritems(self.get_valid_dict()):\n",
"VAR_25 = self.meta.get_field(VAR_16)\n",
"if not VAR_25 or VAR_25.fieldtype == 'Check'... | [
"def _validate_length(self):...\n",
"if frappe.flags.in_install:\n",
"return\n",
"if self.meta.issingle:\n",
"return\n",
"column_types_to_check_length = 'varchar', 'int', 'bigint'\n",
"for fieldname, value in iteritems(self.get_valid_dict()):\n",
"df = self.meta.get_field(fieldname)\n",
"if not df o... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Assign'",
"For",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = jc.Contract()\n",
"return st.OperationContract(self.agent.make_create_app_operation(VAR_1=self\n .bindings, application=self.TEST_APP), VAR_5=contract)\n"
] | [
"def create_app(self):...\n",
"\"\"\"docstring\"\"\"\n",
"contract = jc.Contract()\n",
"return st.OperationContract(self.agent.make_create_app_operation(bindings=\n self.bindings, application=self.TEST_APP), contract=contract)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_21):...\n",
"if VAR_21:\n",
"VAR_106 = int(VAR_21, 36)\n",
"if self.redirect:\n",
"return Link._byID(VAR_106, True)\n",
"abort(404, 'page not found')\n",
"return None\n"
] | [
"def run(self, link_id):...\n",
"if link_id:\n",
"aid = int(link_id, 36)\n",
"if self.redirect:\n",
"return Link._byID(aid, True)\n",
"abort(404, 'page not found')\n",
"return None\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Return'",
"Expr'",
"Return'"
] |
[
"def FUNC_0(self):...\n",
"VAR_1 = bot.Bot(None, {'dimensions': {'foo': 'bar'}},\n 'https://localhost:1/', '1234-1a2b3c4-tainted-joe', 'base_dir', None)\n",
"self.assertEqual({'foo': 'bar'}, VAR_1.dimensions)\n",
"self.assertEqual(os.path.join(os.path.dirname(VAR_0), 'swarming_bot.zip'),\n VAR_1.swarmin... | [
"def test_bot(self):...\n",
"obj = bot.Bot(None, {'dimensions': {'foo': 'bar'}}, 'https://localhost:1/',\n '1234-1a2b3c4-tainted-joe', 'base_dir', None)\n",
"self.assertEqual({'foo': 'bar'}, obj.dimensions)\n",
"self.assertEqual(os.path.join(os.path.dirname(THIS_FILE),\n 'swarming_bot.zip'), obj.swarmin... | [
0,
5,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_7(self, VAR_3):...\n",
"if VAR_3.name in self.host_names:\n",
"self.hosts.remove(VAR_3)\n",
"self._hosts.remove(VAR_3.name)\n",
"VAR_3.remove_group(self)\n",
"self.clear_hosts_cache()\n"
] | [
"def remove_host(self, host):...\n",
"if host.name in self.host_names:\n",
"self.hosts.remove(host)\n",
"self._hosts.remove(host.name)\n",
"host.remove_group(self)\n",
"self.clear_hosts_cache()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@FUNC_3...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_15 = {'css_file': self.css_file, 'js_file': self.js_file_url,\n 'navbar_tab_id': self.navbar_tab_id, 'page_title': self.navbar_tab_title}\n",
"self.reply(self.template_file, VAR_15)\n"
] | [
"@redirect_ui_on_replica...\n",
"\"\"\"docstring\"\"\"\n",
"env = {'css_file': self.css_file, 'js_file': self.js_file_url,\n 'navbar_tab_id': self.navbar_tab_id, 'page_title': self.navbar_tab_title}\n",
"self.reply(self.template_file, env)\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Expr'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"\"\"\"docstring\"\"\"\n",
"self.common.client_login()\n",
"VAR_20 = self._create_host(VAR_6, VAR_9)\n",
"VAR_21 = self.common.create_vlun(VAR_6, VAR_20)\n",
"VAR_22 = self.common.get_ports()\n",
"self.common.client_logout()\n",
"VAR_23 = {'driver_vol... | [
"@utils.synchronized('3par', external=True)...\n",
"\"\"\"docstring\"\"\"\n",
"self.common.client_login()\n",
"host = self._create_host(volume, connector)\n",
"vlun = self.common.create_vlun(volume, host)\n",
"ports = self.common.get_ports()\n",
"self.common.client_logout()\n",
"info = {'driver_volume... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_11 = block.sysfs_to_devpath(VAR_1)\n",
"util.subp(['cryptsetup', 'remove', VAR_11], capture=True)\n"
] | [
"def shutdown_crypt(device):...\n",
"\"\"\"docstring\"\"\"\n",
"blockdev = block.sysfs_to_devpath(device)\n",
"util.subp(['cryptsetup', 'remove', blockdev], capture=True)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_5(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n",
"self.write_data({'type': 'new_version_available', 'event': {'version':\n VAR_5[0]}})\n"
] | [
"def on_new_version_available(self, subject, changetype, objectID, *args):...\n",
"self.write_data({'type': 'new_version_available', 'event': {'version': args\n [0]}})\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@tornado.gen.coroutine...\n",
"VAR_17 = 'DELETE FROM reports WHERE date = %s'\n",
"VAR_18 = VAR_5,\n",
"VAR_19 = yield VAR_1.execute(query=sql, VAR_18=params)\n",
"return VAR_19.fetchone()\n"
] | [
"@tornado.gen.coroutine...\n",
"sql = 'DELETE FROM reports WHERE date = %s'\n",
"params = date,\n",
"cursor = yield tx.execute(query=sql, params=params)\n",
"return cursor.fetchone()\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(self):...\n",
""
] | [
"def test_run_interactive_shell_command_kwargs_delegation(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"@utils.synchronized('3par', external=True)...\n",
""
] | [
"@utils.synchronized('3par', external=True)...\n",
""
] | [
0,
0
] | [
"Condition",
"Condition"
] |
[
"@db_session...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_37 = {'id': self.rowid, 'name': self.title, 'infohash': hexlify(self.\n infohash), 'size': self.size, 'category': self.tags, 'num_seeders':\n self.health.seeders, 'num_leechers': self.health.leechers,\n 'last_tracker_check': self.health.last_check, 's... | [
"@db_session...\n",
"\"\"\"docstring\"\"\"\n",
"simple_dict = {'id': self.rowid, 'name': self.title, 'infohash': hexlify(\n self.infohash), 'size': self.size, 'category': self.tags, 'num_seeders':\n self.health.seeders, 'num_leechers': self.health.leechers,\n 'last_tracker_check': self.health.last_chec... | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_4(self, VAR_9, VAR_3):...\n",
"if isinstance(VAR_9, slice):\n",
"VAR_30 = (\n f\"[{VAR_9.start or ''}:{VAR_9.stop or ''}{VAR_9.step and ':' + VAR_9.step or ''}]\"\n )\n",
"VAR_30 = f'[{VAR_9!r}]'\n",
"self._r_steps_.append((VAR_30, VAR_3))\n"
] | [
"def log_getitem(self, key_name, roamer):...\n",
"if isinstance(key_name, slice):\n",
"item_desc = (\n f\"[{key_name.start or ''}:{key_name.stop or ''}{key_name.step and ':' + key_name.step or ''}]\"\n )\n",
"item_desc = f'[{key_name!r}]'\n",
"self._r_steps_.append((item_desc, roamer))\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self):...\n",
"VAR_16 = self.parser.require('cppwd', 64)\n",
"if not VAR_16 in self.auth.iuser:\n",
"VAR_36 = [u'Set-Cookie: cppwd=x; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'\n ]\n",
"VAR_36 = ['Set-Cookie: cppwd={}; Path=/'.format(VAR_16)]\n",
"self.loud_reply(u'bad_ppwd \"{}\"'.form... | [
"def handle_login(self):...\n",
"pwd = self.parser.require('cppwd', 64)\n",
"if not pwd in self.auth.iuser:\n",
"h = [u'Set-Cookie: cppwd=x; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT']\n",
"h = ['Set-Cookie: cppwd={}; Path=/'.format(pwd)]\n",
"self.loud_reply(u'bad_ppwd \"{}\"'.format(pwd), headers=h)... | [
0,
0,
1,
1,
0,
1,
1
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(self, **VAR_34):...\n",
"\"\"\"docstring\"\"\"\n",
"for arg in VAR_34:\n",
"if hasattr(self, arg):\n",
"self._check_usage()\n",
"setattr(self, arg, VAR_34[arg])\n"
] | [
"def update(self, **kwargs):...\n",
"\"\"\"docstring\"\"\"\n",
"for arg in kwargs:\n",
"if hasattr(self, arg):\n",
"self._check_usage()\n",
"setattr(self, arg, kwargs[arg])\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"For",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_7(VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"@wraps(VAR_7)...\n",
"return VAR_7(*VAR_8, **kwargs)\n",
"current_app.logger.warning(e.message, exc_info=True)\n",
"return FUNC_16\n",
"return FUNC_15(e.remote, e.response, e.code, e.uri, e.description)\n"
] | [
"def oauth_error_handler(f):...\n",
"\"\"\"docstring\"\"\"\n",
"@wraps(f)...\n",
"return f(*args, **kwargs)\n",
"current_app.logger.warning(e.message, exc_info=True)\n",
"return inner\n",
"return oauth2_handle_error(e.remote, e.response, e.code, e.uri, e.description)\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"if self.check() == False:\n",
"return self.redirect('/')\n",
"self.check_xsrf()\n",
"VAR_6 = self.get_arg('oldpassword')\n",
"VAR_7 = self.get_arg('password')\n",
"VAR_8 = self.get_arg('password2')\n",
"VAR_3 = dbapi.User()\n",
"VAR_0 = ''\n",
"if VAR_7 == VAR_8 and VAR_... | [
"def post(self):...\n",
"if self.check() == False:\n",
"return self.redirect('/')\n",
"self.check_xsrf()\n",
"oldpassword = self.get_arg('oldpassword')\n",
"password = self.get_arg('password')\n",
"password2 = self.get_arg('password2')\n",
"user = dbapi.User()\n",
"error = ''\n",
"if password == p... | [
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_6, VAR_7, VAR_8):...\n",
"self.query_params = VAR_6\n",
"self.column_id = VAR_7\n",
"self.ordering_query_param = VAR_8\n",
"self.query_order = VAR_6.get(VAR_8)\n",
"self.current_columns = [int(col) for col in self.query_order.replace('-',\n '').split('.')] if self.query_order el... | [
"def __init__(self, query_params, column_id, ordering_query_param):...\n",
"self.query_params = query_params\n",
"self.column_id = column_id\n",
"self.ordering_query_param = ordering_query_param\n",
"self.query_order = query_params.get(ordering_query_param)\n",
"self.current_columns = [int(col) for col in... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"async def FUNC_4(self):...\n",
"if self._loaded:\n",
"await self._runon('stop')\n"
] | [
"async def stop(self):...\n",
"if self._loaded:\n",
"await self._runon('stop')\n"
] | [
0,
0,
0
] | [
"AsyncFunctionDef'",
"Condition",
"Expr'"
] |
[
"def __init__(self, VAR_20, VAR_21):...\n",
"self.start = VAR_20\n",
"self.end = VAR_21\n"
] | [
"def __init__(self, start, end):...\n",
"self.start = start\n",
"self.end = end\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'"
] |
[
"def FUNC_19(self, *VAR_18):...\n",
"\"\"\"docstring\"\"\"\n",
"self.order.append(list(VAR_18))\n"
] | [
"def add(self, *rulenames):...\n",
"\"\"\"docstring\"\"\"\n",
"self.order.append(list(rulenames))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_6(self, VAR_41):...\n",
"if VAR_41:\n",
"return self.error()\n",
"return Thing._by_fullname(VAR_41, False, data=True)\n"
] | [
"def run(self, fullname):...\n",
"if fullname:\n",
"return self.error()\n",
"return Thing._by_fullname(fullname, False, data=True)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"@property...\n",
"if self._snakefile is None:\n",
"return os.path.abspath(os.path.join(self.workdir, 'Snakefile'))\n",
"if not os.path.isabs(self._snakefile):\n",
"return os.path.abspath(os.path.join(self.workflow.basedir, self._snakefile))\n",
"return self._snakefile\n"
] | [
"@property...\n",
"if self._snakefile is None:\n",
"return os.path.abspath(os.path.join(self.workdir, 'Snakefile'))\n",
"if not os.path.isabs(self._snakefile):\n",
"return os.path.abspath(os.path.join(self.workflow.basedir, self._snakefile))\n",
"return self._snakefile\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_9(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.do_step(HomepageRequest(self.browser, self.username, loggedin=False,\n VAR_10=self.base_url))\n",
"self.do_step(LoginRequest(self.browser, self.username, self.password,\n VAR_10=self.base_url))\n",
"self.do_step(HomepageRequest(self.browser, s... | [
"def login(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.do_step(HomepageRequest(self.browser, self.username, loggedin=False,\n base_url=self.base_url))\n",
"self.do_step(LoginRequest(self.browser, self.username, self.password,\n base_url=self.base_url))\n",
"self.do_step(HomepageRequest(self.browser... | [
0,
0,
5,
5,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"VAR_2 = self.connect()\n",
"VAR_3 = 'DELETE FROM crimes;'\n",
"VAR_2.close()\n",
"cursor.execute(VAR_3)\n",
"VAR_2.commit()\n"
] | [
"def clear_all(self):...\n",
"connection = self.connect()\n",
"query = 'DELETE FROM crimes;'\n",
"connection.close()\n",
"cursor.execute(query)\n",
"connection.commit()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.obj.__name__\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.obj.__name__\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_14(self, VAR_4, VAR_33, VAR_18=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_18 is not None:\n",
"self.flags.ignore_permissions = VAR_18\n",
"if isinstance(VAR_4, dict):\n",
"VAR_4 = [VAR_4]\n",
"for VAR_34 in VAR_4:\n",
"if isinstance(VAR_34, string_types):\n",
"VAR_33.append(VAR_34)\n... | [
"def build_filter_conditions(self, filters, conditions, ignore_permissions=None...\n",
"\"\"\"docstring\"\"\"\n",
"if ignore_permissions is not None:\n",
"self.flags.ignore_permissions = ignore_permissions\n",
"if isinstance(filters, dict):\n",
"filters = [filters]\n",
"for f in filters:\n",
"if isins... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Condition",
"Assign'",
"For",
"Condition",
"Expr'",
"Expr'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_10 = (\n f\"INSERT INTO users (chat_id, first_name, nickname, last_name, language) VALUES ({VAR_7.chat_id}, '{VAR_7.first_name}', '{VAR_7.nickname}', '{VAR_7.last_name}', '{VAR_7.language}')\"\n )\n",
"db.add(VAR_10)\n",
"log.error('Cannot add user... | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"query = (\n f\"INSERT INTO users (chat_id, first_name, nickname, last_name, language) VALUES ({user.chat_id}, '{user.first_name}', '{user.nickname}', '{user.last_name}', '{user.language}')\"\n )\n",
"db.add(query)\n",
"log.error('Cannot add user to the... | [
0,
0,
4,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@VAR_11.event...\n",
"if str(VAR_12.guild.id) != VAR_7:\n",
"return\n",
"if VAR_13 and str(VAR_12.author.id) not in VAR_13:\n",
"return\n",
"VAR_14 = ''\n",
"if VAR_12.content.startswith(VAR_1):\n",
"VAR_14 = VAR_1\n",
"if VAR_12.content.startswith('<@' + str(VAR_5) + '>'):\n",
"async def FUNC_3(... | [
"@bot.event...\n",
"if str(message.guild.id) != discord_bot_server:\n",
"return\n",
"if discord_bot_owner and str(message.author.id) not in discord_bot_owner:\n",
"return\n",
"prefix = ''\n",
"if message.content.startswith(COMMAND_PREFIX):\n",
"prefix = COMMAND_PREFIX\n",
"if message.content.startsw... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"AsyncFunctionDef'",
"Assign'",
"Return'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_2, VAR_3=None, VAR_4=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_12 = self.r_handler.get_query_argument(VAR_2, None)\n",
"if not VAR_12:\n",
"return VAR_4\n",
"if VAR_3 is bool:\n",
"return VAR_12.lower() == 'true'\n",
"if VAR_3 is FUNC_13:\n",
"return VAR_12.split(',')\n",
... | [
"def _query_arg(self, argument_name, output=None, default=None):...\n",
"\"\"\"docstring\"\"\"\n",
"arg = self.r_handler.get_query_argument(argument_name, None)\n",
"if not arg:\n",
"return default\n",
"if output is bool:\n",
"return arg.lower() == 'true'\n",
"if output is list:\n",
"return arg.spli... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_0(self):...\n",
"super(CLASS_0, self).setUp()\n",
"self.configuration = mox.MockObject(conf.Configuration)\n",
"self.configuration.append_config_values(mox.IgnoreArg())\n",
"self.configuration.san_is_local = False\n",
"self.configuration.san_ip = '10.0.0.1'\n",
"self.configuration.san_login = ... | [
"def setUp(self):...\n",
"super(DellEQLSanISCSIDriverTestCase, self).setUp()\n",
"self.configuration = mox.MockObject(conf.Configuration)\n",
"self.configuration.append_config_values(mox.IgnoreArg())\n",
"self.configuration.san_is_local = False\n",
"self.configuration.san_ip = '10.0.0.1'\n",
"self.confi... | [
0,
0,
0,
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'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"As... |
[
"def FUNC_1():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = 'testing inband sql injection on parameter '\n",
"VAR_3 += \"'%s'\" % kb.injParameter\n",
"logger.info(VAR_3)\n",
"VAR_4 = ''\n",
"VAR_0 = agent.prefixQuery(' UNION ALL SELECT NULL')\n",
"for VAR_1 in (queries[kb.dbms].comment, ''):\n",
"VAR_... | [
"def unionTest():...\n",
"\"\"\"docstring\"\"\"\n",
"logMsg = 'testing inband sql injection on parameter '\n",
"logMsg += \"'%s'\" % kb.injParameter\n",
"logger.info(logMsg)\n",
"value = ''\n",
"query = agent.prefixQuery(' UNION ALL SELECT NULL')\n",
"for comment in (queries[kb.dbms].comment, ''):\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"AugAssign'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"AugAssign'",
"AugAssign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_4(self):...\n",
"self.run_test_case(self.scenario.upsert_load_balancer())\n"
] | [
"def test_a_upsert_load_balancer(self):...\n",
"self.run_test_case(self.scenario.upsert_load_balancer())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __init__(self, VAR_37=None, VAR_38=None, VAR_39=False):...\n",
"\"\"\"docstring\"\"\"\n",
"list.__init__(self)\n",
"self._names = dict()\n",
"if VAR_37:\n",
"self.extend(map(str, VAR_37) if VAR_39 else VAR_37)\n",
"if VAR_38:\n",
"if isinstance(VAR_37, CLASS_2):\n",
"for VAR_44, item in VAR_38.... | [
"def __init__(self, toclone=None, fromdict=None, plainstr=False):...\n",
"\"\"\"docstring\"\"\"\n",
"list.__init__(self)\n",
"self._names = dict()\n",
"if toclone:\n",
"self.extend(map(str, toclone) if plainstr else toclone)\n",
"if fromdict:\n",
"if isinstance(toclone, Namedlist):\n",
"for key, ite... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Condition",
"For",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = VAR_5[:]\n",
"for request in VAR_5:\n",
"self.assertEqual(tuple, request.__class__)\n",
"self.assertEqual([], self._requests)\n",
"self.assertIn(len(request), (3, 4))\n",
"self._requests = VAR_5\n"
] | [
"def expected_requests(self, requests):...\n",
"\"\"\"docstring\"\"\"\n",
"requests = requests[:]\n",
"for request in requests:\n",
"self.assertEqual(tuple, request.__class__)\n",
"self.assertEqual([], self._requests)\n",
"self.assertIn(len(request), (3, 4))\n",
"self._requests = requests\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Expr'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def FUNC_7(self, VAR_0, VAR_1):...\n",
"VAR_20 = tweet.objects.filter(hunt_id=Hunt(id=pk)).order_by('-datetime')\n",
"return VAR_20\n"
] | [
"def get_queryset(self, request, pk):...\n",
"query = tweet.objects.filter(hunt_id=Hunt(id=pk)).order_by('-datetime')\n",
"return query\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_19(VAR_6):...\n",
"return FUNC_7(VAR_6, 'X-Download-Options', 'noopen')\n"
] | [
"def validate_download_options(page):...\n",
"return validate_security_header(page, 'X-Download-Options', 'noopen')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"from __future__ import absolute_import\n",
"from mock import MagicMock, patch\n",
"from six.moves.urllib_parse import quote_plus\n",
"from flask import url_for, session\n",
"from invenio.testsuite import make_test_suite, run_test_suite\n",
"from invenio.ext.sqlalchemy import db\n",
"from .helpers impor... | [
"from __future__ import absolute_import\n",
"from mock import MagicMock, patch\n",
"from six.moves.urllib_parse import quote_plus\n",
"from flask import url_for, session\n",
"from invenio.testsuite import make_test_suite, run_test_suite\n",
"from invenio.ext.sqlalchemy import db\n",
"from .helpers impor... | [
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"ImportFrom'",
"Expr'",
"Expr'",
"Expr'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign... |
[
"def FUNC_6(self, VAR_27):...\n",
"if VAR_27:\n",
"VAR_27 = int(VAR_27, 36)\n",
"return Comment._byID(VAR_27, True)\n"
] | [
"def run(self, cid):...\n",
"if cid:\n",
"cid = int(cid, 36)\n",
"return Comment._byID(cid, True)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Return'"
] |
[
"@commands.command()...\n",
"\"\"\"docstring\"\"\"\n",
"await self.simple_embed('string', VAR_2='SD Card Errors')\n"
] | [
"@commands.command()...\n",
"\"\"\"docstring\"\"\"\n",
"await self.simple_embed(\n \"\"\"Guide For Checking SD Card For Errors\n- [H2testw Guide - Windows](https://3ds.guide/h2testw-(windows\\\\))\n- [F3 Guide - Linux](https://3ds.guide/f3-(linux\\\\))\n- [F3X Guide - Mac](https://3ds.guide/f3x-(mac\\\\))\"\... | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'"
] |
[
"def FUNC_1(VAR_2):...\n",
"VAR_8 = psycopg2.connect('dbname=fluffy_bot user=censored password=Laumau11p')\n",
"VAR_9 = VAR_8.cursor()\n",
"VAR_9.execute(VAR_2)\n",
"VAR_8.commit()\n",
"VAR_9.close()\n",
"VAR_8.close()\n"
] | [
"def update(query):...\n",
"conn = psycopg2.connect('dbname=fluffy_bot user=censored password=Laumau11p')\n",
"cur = conn.cursor()\n",
"cur.execute(query)\n",
"conn.commit()\n",
"cur.close()\n",
"conn.close()\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_1(self, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"return authn_init_app('test.localhost', VAR_2)\n"
] | [
"def load_app(self, config):...\n",
"\"\"\"docstring\"\"\"\n",
"return authn_init_app('test.localhost', config)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@VAR_0.route('/login/<remote_app>/')...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_1 not in oauth.remote_apps:\n",
"return abort(404)\n",
"VAR_2 = url_for('.authorized', VAR_1=remote_app, next=request.args.get(\n 'next') or request.referrer or None, _external=True)\n",
"return oauth.remote_apps[VAR_1].aut... | [
"@blueprint.route('/login/<remote_app>/')...\n",
"\"\"\"docstring\"\"\"\n",
"if remote_app not in oauth.remote_apps:\n",
"return abort(404)\n",
"callback_url = url_for('.authorized', remote_app=remote_app, next=request.\n args.get('next') or request.referrer or None, _external=True)\n",
"return oauth.r... | [
0,
0,
0,
0,
5,
5
] | [
"Condition",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(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_protected(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... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_24(self):...\n",
"return self.authenticated\n"
] | [
"def is_authenticated(self):...\n",
"return self.authenticated\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_6(self, VAR_6, VAR_7):...\n",
"self.vars[VAR_6] = VAR_7\n"
] | [
"def set_variable(self, key, value):...\n",
"self.vars[key] = value\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_0(VAR_0):...\n",
""
] | [
"def is_folder(path):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_6(self, VAR_16):...\n",
"for line in filter(lambda error: bool(error.strip()), VAR_16):\n",
"self.warn(line)\n"
] | [
"def _print_errors(self, errors):...\n",
"for line in filter(lambda error: bool(error.strip()), errors):\n",
"self.warn(line)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"For",
"Expr'"
] |
[
"@inlineCallbacks...\n",
"if self.http_server:\n",
"yield maybeDeferred(self.http_server.stopListening)\n",
"yield super(CLASS_0, self).tearDown()\n"
] | [
"@inlineCallbacks...\n",
"if self.http_server:\n",
"yield maybeDeferred(self.http_server.stopListening)\n",
"yield super(TestMakeTorrent, self).tearDown()\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(self, VAR_9):...\n",
"self.formUrl = VAR_9\n",
"VAR_18 = urlparse(self.formUrl)\n",
"self.schema = VAR_18.scheme\n",
"self.host = VAR_18.netloc\n",
"self.httpRequests = 0\n",
"VAR_34 = self.session.get(self.formUrl, headers={'Accept-Encoding': None})\n",
"self.logger.critical('%s : Host un... | [
"def setup(self, initUrl):...\n",
"self.formUrl = initUrl\n",
"url = urlparse(self.formUrl)\n",
"self.schema = url.scheme\n",
"self.host = url.netloc\n",
"self.httpRequests = 0\n",
"initGet = self.session.get(self.formUrl, headers={'Accept-Encoding': None})\n",
"self.logger.critical('%s : Host unreach... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"AugAssign'",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"A... |
[
"def FUNC_3(self):...\n",
"GenericRequest._prepare(self)\n",
"self.files = list(zip(self.submission_format, self.filenames))\n"
] | [
"def _prepare(self):...\n",
"GenericRequest._prepare(self)\n",
"self.files = list(zip(self.submission_format, self.filenames))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"def FUNC_39(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.cursor.execute('create table t1(a int, b varchar(10))')\n",
"VAR_28 = [(1, 'good'), ('error', 'not an int'), (3, 'good')]\n",
"self.assertRaises(pyodbc.Error, self.cursor.executemany,\n 'insert into t1(a, b) value (?, ?)', VAR_28)\n"
] | [
"def test_executemany_failure(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.cursor.execute('create table t1(a int, b varchar(10))')\n",
"params = [(1, 'good'), ('error', 'not an int'), (3, 'good')]\n",
"self.assertRaises(pyodbc.Error, self.cursor.executemany,\n 'insert into t1(a, b) value (?, ?)', param... | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_10(self, VAR_4, VAR_0, VAR_1, VAR_8, VAR_2, VAR_3=None):...\n",
"VAR_5 = VAR_4[:]\n",
"VAR_5.append(b'')\n",
"VAR_5.extend(self.make_req_msg(VAR_0, VAR_1, VAR_8, VAR_2, VAR_3))\n",
"return VAR_5\n"
] | [
"def make_router_req_msg(self, iden, interface, method, args, fun, reqid=None):...\n",
"msg = iden[:]\n",
"msg.append(b'')\n",
"msg.extend(self.make_req_msg(interface, method, args, fun, reqid))\n",
"return msg\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_10(VAR_7, VAR_13='{}'):...\n",
"VAR_14 = FUNC_9(VAR_7)\n",
"VAR_48 = FUNC_11(VAR_14, VAR_13) if VAR_14 else None\n",
"return VAR_48\n"
] | [
"def get_sanitized_bracket(url, symbol='{}'):...\n",
"bracket = get_bracket(url)\n",
"sanitized = sanitize_bracket(bracket, symbol) if bracket else None\n",
"return sanitized\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@VAR_0.route('/login/<remote_app>/')...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_1 not in oauth.remote_apps:\n",
"return abort(404)\n",
"VAR_2 = url_for('.authorized', VAR_1=remote_app, next=request.args.get(\n 'next') or request.referrer or None, _external=True)\n",
"return oauth.remote_apps[VAR_1].aut... | [
"@blueprint.route('/login/<remote_app>/')...\n",
"\"\"\"docstring\"\"\"\n",
"if remote_app not in oauth.remote_apps:\n",
"return abort(404)\n",
"callback_url = url_for('.authorized', remote_app=remote_app, next=request.\n args.get('next') or request.referrer or None, _external=True)\n",
"return oauth.r... | [
0,
0,
0,
0,
5,
5
] | [
"Condition",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Return'"
] |
[
"from osv import osv\n",
"from tools.translate import _\n",
"import time\n",
"VAR_0 = 'pos.open.statement'\n",
"VAR_1 = 'Open Statements'\n",
"def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = []\n",
"VAR_7 = self.pool.get('ir.model.data')\n",
"VAR_8 = self.p... | [
"from osv import osv\n",
"from tools.translate import _\n",
"import time\n",
"_name = 'pos.open.statement'\n",
"_description = 'Open Statements'\n",
"def open_statement(self, cr, uid, ids, context):...\n",
"\"\"\"docstring\"\"\"\n",
"list_statement = []\n",
"mod_obj = self.pool.get('ir.model.data')\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'... |
[
"@VAR_0.route('/profile/<int:ID>', methods=['GET', 'PUT', 'DELETE'])...\n",
"if not db_isProfileExists(VAR_1):\n",
"return jsonify({'status': 1, 'message': 'Такого аккаунта не существует'})\n",
"if request.method == 'GET':\n",
"return jsonify(db_getProfileInfo(VAR_1))\n",
"if request.method == 'PUT':\n",
... | [
"@profile_module.route('/profile/<int:ID>', methods=['GET', 'PUT', 'DELETE'])...\n",
"if not db_isProfileExists(ID):\n",
"return jsonify({'status': 1, 'message': 'Такого аккаунта не существует'})\n",
"if request.method == 'GET':\n",
"return jsonify(db_getProfileInfo(ID))\n",
"if request.method == 'PUT':\n... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'",
"Return'",
"Return'"
] |
[
"def __init__(self, VAR_17, VAR_18):...\n",
"self._src_prx = VAR_17\n",
"self._tgt_prx = VAR_18\n",
"self.__traversed = set()\n",
"self.__root_is_sequence = (not VAR_17 is None and VAR_17.proxy_for ==\n RESOURCE_KINDS.COLLECTION or not VAR_18 is None and VAR_18.proxy_for ==\n RESOURCE_KINDS.COLLECTION... | [
"def __init__(self, source_proxy, target_proxy):...\n",
"self._src_prx = source_proxy\n",
"self._tgt_prx = target_proxy\n",
"self.__traversed = set()\n",
"self.__root_is_sequence = (not source_proxy is None and source_proxy.\n proxy_for == RESOURCE_KINDS.COLLECTION or not target_proxy is None and \n t... | [
0,
0,
0,
1,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'"
] |
[
"def FUNC_27(VAR_40, VAR_41):...\n",
"VAR_71 = os.path.dirname(VAR_40)\n",
"if not os.path.isdir(VAR_71):\n",
"os.mkdir(VAR_71)\n",
"VAR_72 = open(VAR_40, 'w')\n",
"VAR_72.write(VAR_41)\n",
"VAR_72.close()\n"
] | [
"def save_keywords(filename, xml):...\n",
"tmp_dir = os.path.dirname(filename)\n",
"if not os.path.isdir(tmp_dir):\n",
"os.mkdir(tmp_dir)\n",
"file_desc = open(filename, 'w')\n",
"file_desc.write(xml)\n",
"file_desc.close()\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"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_16(self):...\n",
"return True\n"
] | [
"def do_existing_paths(self):...\n",
"return True\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self, VAR_1, VAR_2, VAR_5, VAR_4=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_4 is None:\n",
"VAR_4 = {}\n",
"VAR_30 = VAR_4.get('states', [])\n",
"VAR_31 = VAR_4.get('what', ())\n",
"if not VAR_5:\n",
"VAR_5 = self.search(VAR_1, VAR_2, [])\n",
"VAR_29 = {}.fromkeys(VAR_5, 0.0)\n",
... | [
"def get_product_available(self, cr, uid, ids, context=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if context is None:\n",
"context = {}\n",
"states = context.get('states', [])\n",
"what = context.get('what', ())\n",
"if not ids:\n",
"ids = self.search(cr, uid, [])\n",
"res = {}.fromkeys(ids, 0.0)\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
4,
0,
4,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition"... |
[
"@staticmethod...\n",
"return ' '.join(escape_path_argument(s) for s in (sys.executable, os.path.\n join(os.path.dirname(os.path.realpath(__file__)),\n 'run_shell_command_testfiles', VAR_0)))\n"
] | [
"@staticmethod...\n",
"return ' '.join(escape_path_argument(s) for s in (sys.executable, os.path.\n join(os.path.dirname(os.path.realpath(__file__)),\n 'run_shell_command_testfiles', scriptname)))\n"
] | [
0,
2
] | [
"Condition",
"Return'"
] |
[
"def FUNC_54(self):...\n",
"self.cursor.execute('create table t1(a blob)')\n",
"VAR_35 = 'x' * 100 * 1024\n",
"self.cursor.execute('update t1 set a=? where 1=0', (VAR_35,))\n"
] | [
"def test_large_update_nodata(self):...\n",
"self.cursor.execute('create table t1(a blob)')\n",
"hundredkb = 'x' * 100 * 1024\n",
"self.cursor.execute('update t1 set a=? where 1=0', (hundredkb,))\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_33(self, VAR_24):...\n",
"return self.regex().match(VAR_24) or None\n"
] | [
"def match(self, target):...\n",
"return self.regex().match(target) or None\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self, VAR_7, VAR_54=None, VAR_55=None, VAR_14=errors....\n",
"self.min = VAR_54\n",
"self.max = VAR_55\n",
"self.error = VAR_14\n",
"CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n"
] | [
"def __init__(self, param, min=None, max=None, error=errors.BAD_NUMBER, *a, **kw...\n",
"self.min = min\n",
"self.max = max\n",
"self.error = error\n",
"Validator.__init__(self, param, *a, **kw)\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_4(VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_11 = 'string'.format(VAR_2=sku, VAR_3=ebay_id, VAR_4=qty, VAR_5=price,\n VAR_6=site, VAR_22=hits, VAR_23=watches, VAR_24=questions)\n",
"frappe.db.sql(VAR_11, auto_commit=True)\n"
] | [
"def insert_ebay_listing(sku, ebay_id, qty, price, site, hits, watches,...\n",
"\"\"\"docstring\"\"\"\n",
"sql = (\n \"\"\"\n insert into `zEbayListings`\n values('{sku}', '{ebay_id}', {qty}, {price}, '{site}', {hit_count}, {watch_count}, {question_count})\n \"\"\"\n .format(sku=sku, ebay_id=ebay... | [
0,
0,
4,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_2(VAR_9):...\n",
"VAR_34 = VAR_9.cmd('list-panes', '-F #{pane_pid}')\n",
"return [int(p) for p in VAR_34.stdout]\n"
] | [
"def get_window_pid(window):...\n",
"r = window.cmd('list-panes', '-F #{pane_pid}')\n",
"return [int(p) for p in r.stdout]\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(VAR_6, VAR_7):...\n",
"if VAR_7.data is VAR_6[VAR_5].data:\n"
] | [
"def _different(form, field):...\n",
"if field.data is form[fieldname].data:\n"
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def __exit__(self, VAR_2, VAR_3, VAR_4):...\n",
"if self.conn:\n",
"self.conn.close()\n"
] | [
"def __exit__(self, exc_type, exc_val, exc_tb):...\n",
"if self.conn:\n",
"self.conn.close()\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'"
] |
[
"@staticmethod...\n",
"if not VAR_1 or not VAR_7 or not VAR_6:\n",
"if not VAR_5:\n",
"VAR_5 = CLASS_0.get_report(VAR_1)['analysis']\n",
"VAR_16 = VAR_5['behavior']['generic']\n",
"VAR_17 = [z for z in VAR_16 if z['pid'] == VAR_6]\n",
"if not VAR_17:\n",
"VAR_17 = VAR_17[0]\n",
"VAR_18 = VAR_17['sum... | [
"@staticmethod...\n",
"if not task_id or not watcher or not pid:\n",
"if not report:\n",
"report = AnalysisController.get_report(task_id)['analysis']\n",
"behavior_generic = report['behavior']['generic']\n",
"process = [z for z in behavior_generic if z['pid'] == pid]\n",
"if not process:\n",
"process ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_0, VAR_1, VAR_2):...\n",
"super(CLASS_5, self).__init__(VAR_0, VAR_1, VAR_2, 'DELETE')\n"
] | [
"def __init__(self, connection, args, logger):...\n",
"super(HttpDelete, self).__init__(connection, args, logger, 'DELETE')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_18(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.parser.parse_args(['--delete-match'])\n"
] | [
"def test_arg_delete_match(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.parser.parse_args(['--delete-match'])\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_12(self):...\n",
"VAR_16 = KeyboardInterruptCheck()\n",
"self.assertRaises(KeyboardInterrupt, self.runall, [VAR_16])\n",
"VAR_15 = self.runner.stats\n",
"self.assertEqual(1, len(VAR_15.failures()))\n",
"self.assert_all_dead()\n"
] | [
"def test_kbd_interrupt_within_test(self):...\n",
"check = KeyboardInterruptCheck()\n",
"self.assertRaises(KeyboardInterrupt, self.runall, [check])\n",
"stats = self.runner.stats\n",
"self.assertEqual(1, len(stats.failures()))\n",
"self.assert_all_dead()\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def __init__(self, VAR_16):...\n",
"self.flags = dict()\n"
] | [
"def __init__(self, value):...\n",
"self.flags = dict()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_0(VAR_0, VAR_1, VAR_2):...\n",
"VAR_3 = ndb.Key(urlsafe=key_urlsafe).get()\n",
"assert VAR_3\n",
"assert VAR_3.status == analysis_status.COMPLETED\n",
"assert VAR_3.suspected_flake_build_number is not None\n",
"if VAR_3.culprit:\n",
"VAR_6 = {'culprit_revision': VAR_3.culprit.revision,\n 'c... | [
"def _UpdateSuspectedFlakeAnalysis(key_urlsafe, triage_result, user_name):...\n",
"master_flake_analysis = ndb.Key(urlsafe=key_urlsafe).get()\n",
"assert master_flake_analysis\n",
"assert master_flake_analysis.status == analysis_status.COMPLETED\n",
"assert master_flake_analysis.suspected_flake_build_number... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assert'",
"Assert'",
"Assert'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_11():...\n",
"VAR_8 = logging.getLogger(__name__)\n",
"VAR_8.setLevel(logging.DEBUG)\n",
"VAR_36 = argparse.ArgumentParser()\n",
"VAR_36.add_argument('--config', '-c', type=str, default='test.yaml', help=\n 'YAML config file. see sample-config.yaml. Default: test.yaml')\n",
"VAR_37 = VAR_36.a... | [
"def main():...\n",
"logger = logging.getLogger(__name__)\n",
"logger.setLevel(logging.DEBUG)\n",
"parser = argparse.ArgumentParser()\n",
"parser.add_argument('--config', '-c', type=str, default='test.yaml', help=\n 'YAML config file. see sample-config.yaml. Default: test.yaml')\n",
"subparsers = parse... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Expr'",
... |
[
"@app.route('/api/directory_browser', methods=['GET'])...\n",
"VAR_24 = request.args.get('path', '/')\n",
"if not os.path.exists(VAR_24):\n",
"VAR_35 = VAR_24\n",
"if not os.path.isdir(VAR_24):\n",
"while not os.path.isdir(VAR_35):\n",
"VAR_25 = sorted(os.listdir(VAR_24))\n",
"VAR_35 = os.path.dirname... | [
"@app.route('/api/directory_browser', methods=['GET'])...\n",
"path = request.args.get('path', '/')\n",
"if not os.path.exists(path):\n",
"parent_dir = path\n",
"if not os.path.isdir(path):\n",
"while not os.path.isdir(parent_dir):\n",
"entries = sorted(os.listdir(path))\n",
"parent_dir = os.path.dirn... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.