lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"@staticmethod...\n",
"VAR_0 = Database()\n",
"VAR_11 = VAR_0.list_tasks(VAR_2=limit, VAR_3=offset, VAR_30='file',\n not_status=TASK_PENDING)\n",
"VAR_12 = VAR_0.list_tasks(VAR_2=limit, VAR_3=offset, VAR_30='url',\n not_status=TASK_PENDING)\n",
"VAR_9 = []\n",
"if VAR_11:\n",
"for VAR_10 in VAR_11... | [
"@staticmethod...\n",
"db = Database()\n",
"tasks_files = db.list_tasks(limit=limit, offset=offset, category='file',\n not_status=TASK_PENDING)\n",
"tasks_urls = db.list_tasks(limit=limit, offset=offset, category='url',\n not_status=TASK_PENDING)\n",
"data = []\n",
"if tasks_files:\n",
"for task i... | [
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'",
"Condition",
"For",
"Condition",
"Assign'",
"For",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self):...\n",
"if is_banned_IP(VAR_102.ip):\n",
"VAR_101.errors.add(errors.BANNED_IP)\n",
"return VAR_102.ip\n"
] | [
"def run(self):...\n",
"if is_banned_IP(request.ip):\n",
"c.errors.add(errors.BANNED_IP)\n",
"return request.ip\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_8(VAR_14, VAR_19, VAR_20, VAR_23=None, VAR_3=None, VAR_4=None,...\n",
"if VAR_14.method == 'GET':\n",
"VAR_27 = {'article__title': VAR_19}\n",
"return HttpResponseNotAllowed(['GET'])\n",
"if VAR_3 is not None:\n",
"VAR_8 = get_object_or_404(VAR_5, **{group_slug_field: group_slug})\n",
"VAR_53 ... | [
"def view_changeset(request, title, revision, revision_from=None, group_slug...\n",
"if request.method == 'GET':\n",
"article_args = {'article__title': title}\n",
"return HttpResponseNotAllowed(['GET'])\n",
"if group_slug is not None:\n",
"group = get_object_or_404(group_qs, **{group_slug_field: group_slu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign... |
[
"def __init__(self, *VAR_6, **VAR_7):...\n",
"self.dg_type = VAR_7.pop('dg_type', 0)\n",
"self.user = VAR_7.pop('user', None)\n",
"super(CLASS_1, self).__init__(*VAR_6, **kwargs)\n",
"self.fields['weight_fraction_type'].widget.attrs.update({'style':\n 'height:2.75rem; !important'})\n",
"self.fields['sc... | [
"def __init__(self, *args, **kwargs):...\n",
"self.dg_type = kwargs.pop('dg_type', 0)\n",
"self.user = kwargs.pop('user', None)\n",
"super(ExtractionScriptForm, self).__init__(*args, **kwargs)\n",
"self.fields['weight_fraction_type'].widget.attrs.update({'style':\n 'height:2.75rem; !important'})\n",
"s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Assign'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._server_version\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._server_version\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_23(self, VAR_21, VAR_27, VAR_28):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_57 = self.getfile(VAR_21)\n",
"if VAR_57 == False:\n",
"if VAR_27 != -1:\n",
"VAR_57[VAR_3] = VAR_27\n",
"if VAR_28 != -1:\n",
"VAR_57[VAR_4] = VAR_28\n"
] | [
"def chown(self, path, uid, gid):...\n",
"\"\"\"docstring\"\"\"\n",
"p = self.getfile(path)\n",
"if p == False:\n",
"if uid != -1:\n",
"p[A_UID] = uid\n",
"if gid != -1:\n",
"p[A_GID] = gid\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'"
] |
[
"def FUNC_2(VAR_1, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_1.enabled:\n",
"FUNC_0(VAR_2)\n",
"if VAR_1.use_tls:\n",
"VAR_3 = FTP_TLS(VAR_1.server)\n",
"VAR_3 = FTP(VAR_1.server)\n",
"VAR_3.login(VAR_1.username, VAR_1.password)\n",
"VAR_3.login(VAR_1.username, VAR_1.password)\n",
"VAR_3.p... | [
"def fetch_data_via_ftp(ftp_config, local_directory):...\n",
"\"\"\"docstring\"\"\"\n",
"if ftp_config.enabled:\n",
"create_directory_tree(local_directory)\n",
"if ftp_config.use_tls:\n",
"ftp = FTP_TLS(ftp_config.server)\n",
"ftp = FTP(ftp_config.server)\n",
"ftp.login(ftp_config.username, ftp_config... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"E... |
[
"def FUNC_0(VAR_0):...\n",
"return VAR_0.scheme in ['', 'file']\n"
] | [
"def is_file(parsed_uri):...\n",
"return parsed_uri.scheme in ['', 'file']\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_0(VAR_0, VAR_1):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_1.last_login:\n",
"return reverse('core:user_index')\n",
"VAR_2 = VAR_0.POST.get('next', None)\n",
"if VAR_2 is None or VAR_2 == 'None':\n",
"if VAR_0.user.role == 'SimpleUsers':\n",
"return VAR_2\n",
"VAR_3 = VAR_0.localconfig... | [
"def find_nextlocation(request, user):...\n",
"\"\"\"docstring\"\"\"\n",
"if not user.last_login:\n",
"return reverse('core:user_index')\n",
"nextlocation = request.POST.get('next', None)\n",
"if nextlocation is None or nextlocation == 'None':\n",
"if request.user.role == 'SimpleUsers':\n",
"return ne... | [
0,
0,
0,
0,
6,
6,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Condition",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_1(self):...\n",
"VAR_8 = Org.objects.order_by('id')\n",
"return VAR_8\n"
] | [
"def get_queryset(self):...\n",
"query = Org.objects.order_by('id')\n",
"return query\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self):...\n",
"self._tab_after('t')\n",
"eq_(len(self.terminal.method_calls), 0)\n"
] | [
"def test_complete_not_found(self):...\n",
"self._tab_after('t')\n",
"eq_(len(self.terminal.method_calls), 0)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'"
] |
[
"import re\n",
"import tornado\n",
"from bzs import files\n",
"from bzs import const\n",
"VAR_0 = ['GET', 'HEAD']\n",
"@tornado.web.asynchronous...\n",
"VAR_2 = files.get_static_data('./static/404.html')\n",
"VAR_2 = '404 Not Found'\n",
"self.set_status(200, 'OK')\n",
"self._headers = tornado.http... | [
"import re\n",
"import tornado\n",
"from bzs import files\n",
"from bzs import const\n",
"SUPPORTED_METHODS = ['GET', 'HEAD']\n",
"@tornado.web.asynchronous...\n",
"file_data = files.get_static_data('./static/404.html')\n",
"file_data = '404 Not Found'\n",
"self.set_status(200, 'OK')\n",
"self._he... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_7(VAR_13, VAR_2, VAR_5, VAR_12):...\n",
"VAR_26 = VAR_13.request.body\n",
"VAR_13.request.body = None\n",
"VAR_2 = FUNC_1(VAR_2)\n",
"db.Filesystem.mkfile(VAR_2, VAR_5, VAR_12.username, VAR_26)\n",
"VAR_6.set_result('bzs_upload_success')\n"
] | [
"def save_file_async(alter_ego, target_path, file_name, working_user):...\n",
"upload_data = alter_ego.request.body\n",
"alter_ego.request.body = None\n",
"target_path = decode_hexed_b64_to_str(target_path)\n",
"db.Filesystem.mkfile(target_path, file_name, working_user.username, upload_data\n )\n",
"fu... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def __init__(self, VAR_0=None):...\n",
"self.depth = 0\n",
"self.name = VAR_0\n",
"self.hosts = []\n",
"self._hosts = None\n",
"self.vars = {}\n",
"self.child_groups = []\n",
"self.parent_groups = []\n",
"self._hosts_cache = None\n",
"self.priority = 1\n"
] | [
"def __init__(self, name=None):...\n",
"self.depth = 0\n",
"self.name = name\n",
"self.hosts = []\n",
"self._hosts = None\n",
"self.vars = {}\n",
"self.child_groups = []\n",
"self.parent_groups = []\n",
"self._hosts_cache = None\n",
"self.priority = 1\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._state\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._state\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"return self.extracted_cpcat.extractedtext_ptr\n"
] | [
"def get_extractedtext(self):...\n",
"return self.extracted_cpcat.extractedtext_ptr\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_40(self):...\n",
"self.cursor.execute('create table t1(a int, b int, c int, d int)')\n",
"self.cursor.execute('insert into t1 values(1,2,3,4)')\n",
"VAR_24 = self.cursor.execute('select * from t1').fetchone()\n",
"VAR_20 = VAR_24[:]\n",
"self.assertTrue(VAR_20 is VAR_24)\n",
"VAR_20 = VAR_24[:... | [
"def test_row_slicing(self):...\n",
"self.cursor.execute('create table t1(a int, b int, c int, d int)')\n",
"self.cursor.execute('insert into t1 values(1,2,3,4)')\n",
"row = self.cursor.execute('select * from t1').fetchone()\n",
"result = row[:]\n",
"self.assertTrue(result is row)\n",
"result = row[:-1]... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_40(VAR_87):...\n",
"return filterfalse(self.is_rule, VAR_87)\n"
] | [
"def files(items):...\n",
"return filterfalse(self.is_rule, items)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"return self.content\n"
] | [
"def read(self):...\n",
"return self.content\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"return HttpResponseRedirect(self.failure_url)\n"
] | [
"def login_failure(self):...\n",
"return HttpResponseRedirect(self.failure_url)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_8(VAR_24):...\n",
"return binary_to_object_id(VAR_24).redis_shard_hash() % len(self.state.\n redis_clients)\n"
] | [
"def to_shard_index(id_bin):...\n",
"return binary_to_object_id(id_bin).redis_shard_hash() % len(self.state.\n redis_clients)\n"
] | [
0,
0
] | [
"FunctionDef'",
"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'"
] |
[
"@atomic...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = self.get_repo_root()\n",
"VAR_22 = self.get_branches(VAR_5)\n",
"if not self.quiet:\n",
"print('\\n'.join(VAR_22))\n",
"return VAR_22\n"
] | [
"@atomic...\n",
"\"\"\"docstring\"\"\"\n",
"fs_repo_root = self.get_repo_root()\n",
"branches = self.get_branches(fs_repo_root)\n",
"if not self.quiet:\n",
"print('\\n'.join(branches))\n",
"return branches\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"@VAR_0.route('/department/<department>', methods=['GET'])...\n",
"VAR_8 = FUNC_2()\n",
"VAR_0 = ProductsRepository.get_department_products(VAR_8, VAR_4)\n",
"VAR_10 = ProductsRepository.get_total_departments_products(VAR_8, VAR_4)\n",
"VAR_9 = ceil(VAR_10 / VAR_8['perPage'])\n",
"return jsonify(VAR_0=pro... | [
"@products.route('/department/<department>', methods=['GET'])...\n",
"filters = get_filters()\n",
"products = ProductsRepository.get_department_products(filters, department)\n",
"total_products = ProductsRepository.get_total_departments_products(filters,\n department)\n",
"total_pages = ceil(total_produc... | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_3():...\n",
"VAR_3 = FUNC_0()\n",
"VAR_4 = VAR_3.cursor()\n",
"VAR_4.execute('string')\n",
"VAR_4.execute('ALTER TABLE players OWNER TO postgres;')\n",
"VAR_4.execute('string')\n",
"VAR_4.execute('ALTER TABLE matches OWNER TO postgres;')\n",
"VAR_3.commit()\n",
"VAR_4.close()\n",
"VAR_3.... | [
"def create():...\n",
"co = connect()\n",
"cu = co.cursor()\n",
"cu.execute(\n 'CREATE TABLE players(id serial NOT NULL,name text NOT NULL, country text NOT NULL, code text, CONSTRAINT players_pkey PRIMARY KEY (id))WITH (OIDS=FALSE);'\n )\n",
"cu.execute('ALTER TABLE players OWNER TO postgres;')\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_17 = [VAR_28.mtime for VAR_28 in self.expanded_output if VAR_28.exists]\n",
"if self.benchmark and self.benchmark.exists:\n",
"VAR_17.append(self.benchmark.mtime)\n",
"if VAR_17:\n",
"return min(VAR_17)\n",
"return None\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"existing = [f.mtime for f in self.expanded_output if f.exists]\n",
"if self.benchmark and self.benchmark.exists:\n",
"existing.append(self.benchmark.mtime)\n",
"if existing:\n",
"return min(existing)\n",
"return None\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"VAR_5 = [{'application': self.TEST_APP, 'stack': self.TEST_STACK,\n 'credentials': self.bindings['GCE_CREDENTIALS'], 'zone': self.TEST_ZONE,\n 'network': 'default', 'targetSize': 1, 'capacity': {'min': 1, 'max': 1,\n 'desired': 1}, 'availabilityZones': {self.TEST_REGION: [self.... | [
"def create_instances(self):...\n",
"job = [{'application': self.TEST_APP, 'stack': self.TEST_STACK,\n 'credentials': self.bindings['GCE_CREDENTIALS'], 'zone': self.TEST_ZONE,\n 'network': 'default', 'targetSize': 1, 'capacity': {'min': 1, 'max': 1,\n 'desired': 1}, 'availabilityZones': {self.TEST_REGION... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"@VAR_0.route('/rename_column', methods=['POST'])...\n",
"VAR_1 = get_dataset_with_id(request.args.get('dataset_id'))\n",
"VAR_2 = request.form['column']\n",
"VAR_3 = request.form['new_name']\n",
"rename_attribute(VAR_1.working_copy, VAR_2, VAR_3)\n",
"flash('An unexpected error occured while renaming the... | [
"@_transform.route('/rename_column', methods=['POST'])...\n",
"dataset = get_dataset_with_id(request.args.get('dataset_id'))\n",
"col = request.form['column']\n",
"new_name = request.form['new_name']\n",
"rename_attribute(dataset.working_copy, col, new_name)\n",
"flash('An unexpected error occured while r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_4(VAR_0, VAR_3):...\n",
"VAR_4 = VAR_0.cursor()\n",
"VAR_5 = 'ALTER TABLE Presets DROP COLUMN id;'\n",
"VAR_4.execute(VAR_5)\n",
"VAR_5 = (\n 'ALTER TABLE Presets ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY NOT NULL FIRST;'\n )\n",
"VAR_4.execute(VAR_5)\n",
"VAR_6 = Table('Presets')\n",... | [
"def get_descriptin(conn, key):...\n",
"cursor = conn.cursor()\n",
"quer = 'ALTER TABLE Presets DROP COLUMN id;'\n",
"cursor.execute(quer)\n",
"quer = (\n 'ALTER TABLE Presets ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY NOT NULL FIRST;'\n )\n",
"cursor.execute(quer)\n",
"extable = Table('Presets'... | [
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_0(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"return '%s_%s' % (cfg['OAUTHCLIENT_SESSION_KEY_PREFIX'], VAR_0)\n"
] | [
"def token_session_key(remote_app):...\n",
"\"\"\"docstring\"\"\"\n",
"return '%s_%s' % (cfg['OAUTHCLIENT_SESSION_KEY_PREFIX'], remote_app)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"return 'check submission %s' % self.submission_id\n"
] | [
"def describe(self):...\n",
"return 'check submission %s' % self.submission_id\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_29(VAR_39):...\n",
"if not VAR_39 or VAR_39 == 'None':\n",
"VAR_39 = datetime.today().strftime('%Y-%m-%d')\n",
"VAR_39 = VAR_39[:10]\n",
"return datetime.strptime(VAR_39, '%Y-%m-%d')\n"
] | [
"def str_to_datetime(str):...\n",
"if not str or str == 'None':\n",
"str = datetime.today().strftime('%Y-%m-%d')\n",
"str = str[:10]\n",
"return datetime.strptime(str, '%Y-%m-%d')\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"return self._output\n"
] | [
"@property...\n",
"return self._output\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"import os\n",
"import argparse\n",
"from jinja2 import Environment, FileSystemLoader\n",
"def FUNC_0(VAR_0, VAR_1):...\n",
"VAR_3 = os.path.dirname(os.path.abspath(__file__))\n",
"VAR_4 = Environment(loader=FileSystemLoader(UTILS_DIR))\n",
"return VAR_4.get_template('templates/eb/config.yml').render(AP... | [
"import os\n",
"import argparse\n",
"from jinja2 import Environment, FileSystemLoader\n",
"def make_eb_config(application_name, default_region):...\n",
"UTILS_DIR = os.path.dirname(os.path.abspath(__file__))\n",
"j2_env = Environment(loader=FileSystemLoader(UTILS_DIR))\n",
"return j2_env.get_template('t... | [
0,
0,
0,
0,
0,
3,
0
] | [
"Import'",
"Import'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@tornado.gen.coroutine...\n",
"VAR_30 = list(['SUM({})'.format(VAR_41) for VAR_41 in VAR_6])\n",
"VAR_17 = 'string'.format(','.join(VAR_30))\n",
"VAR_18 = VAR_3, VAR_2\n",
"VAR_19 = yield VAR_1.execute(query=sql, VAR_18=params)\n",
"VAR_26 = VAR_19.fetchall()\n",
"VAR_31, VAR_32 = calendar.monthrange(V... | [
"@tornado.gen.coroutine...\n",
"avg_list = list(['SUM({})'.format(col) for col in cols])\n",
"sql = (\n 'SELECT DAY(date), {} FROM reports JOIN boiler_room_reports ON(reports.id = report_id) WHERE MONTH(date) = %s and YEAR(date) = %s GROUP BY date;'\n .format(','.join(avg_list)))\n",
"params = month, ye... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"AugAssign'"
] |
[
"def FUNC_1(VAR_0):...\n",
"VAR_8 = FUNC_0(VAR_0)\n",
"VAR_9 = VAR_8.content_src_dir\n",
"VAR_10 = VAR_8.content_dst_dir\n",
"VAR_3 = VAR_8.www_root or DEFAULT_PYWEB_CONTENT_DIR\n",
"VAR_11 = VAR_8.log_path or DEFAULT_PYWEB_LOG_DIR\n",
"logging.basicConfig(filename=os.path.join(logpath, 'pyweb-installer... | [
"def main(argv):...\n",
"args = parse_args(argv)\n",
"src_dir = args.content_src_dir\n",
"dst_dir = args.content_dst_dir\n",
"www_root = args.www_root or DEFAULT_PYWEB_CONTENT_DIR\n",
"logpath = args.log_path or DEFAULT_PYWEB_LOG_DIR\n",
"logging.basicConfig(filename=os.path.join(logpath, 'pyweb-install... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'signup_link')\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'signup_link')\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_36(VAR_47):...\n",
"return fast_relpath(VAR_47, get_buildroot())\n"
] | [
"def relative_to_exec_root(path):...\n",
"return fast_relpath(path, get_buildroot())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_2(self):...\n",
"\"\"\"docstring\"\"\"\n",
"for operation in self._queue:\n",
"if operation.name not in VAR_0:\n",
"VAR_16 = self.expectation(self._observe.name, self._observe.wires)\n",
"VAR_10 = [(x.val if isinstance(x, Variable) else x) for x in operation.params]\n",
"self._deallocate()\n",... | [
"def execute_queued(self):...\n",
"\"\"\"docstring\"\"\"\n",
"for operation in self._queue:\n",
"if operation.name not in operator_map:\n",
"result = self.expectation(self._observe.name, self._observe.wires)\n",
"par = [(x.val if isinstance(x, Variable) else x) for x in operation.params]\n",
"self._deal... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"For",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_1(VAR_0, VAR_1):...\n",
"return os.utime(VAR_0, VAR_1, follow_symlinks=os.utime not in os.\n supports_follow_symlinks)\n"
] | [
"def lutime(f, times):...\n",
"return os.utime(f, times, follow_symlinks=os.utime not in os.\n supports_follow_symlinks)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_14 = type(self)()\n",
"VAR_14.charset = self.charset\n",
"if self._parts:\n",
"VAR_14._parts = list(self._parts)\n",
"VAR_14._path = self._path\n",
"VAR_14._leading_slash = self._leading_slash\n",
"return VAR_14\n",
"VAR_14._trailing_slash ... | [
"def clone(self):...\n",
"\"\"\"docstring\"\"\"\n",
"new_obj = type(self)()\n",
"new_obj.charset = self.charset\n",
"if self._parts:\n",
"new_obj._parts = list(self._parts)\n",
"new_obj._path = self._path\n",
"new_obj._leading_slash = self._leading_slash\n",
"return new_obj\n",
"new_obj._trailing_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Return'",
"Assign'"
] |
[
"def FUNC_0(VAR_0):...\n",
"VAR_6 = ['preferred', 'other', 'exceptions']\n",
"VAR_7 = VAR_0.head.commit.tree['LICENSES']\n",
"VAR_8 = CLASS_2()\n",
"for d in VAR_6:\n",
"for VAR_5 in VAR_7[d].traverse():\n",
"return VAR_8\n",
"if not os.path.isfile(VAR_5.path):\n",
"VAR_23 = None\n",
"for l in ope... | [
"def read_spdxdata(repo):...\n",
"license_dirs = ['preferred', 'other', 'exceptions']\n",
"lictree = repo.head.commit.tree['LICENSES']\n",
"spdx = SPDXdata()\n",
"for d in license_dirs:\n",
"for el in lictree[d].traverse():\n",
"return spdx\n",
"if not os.path.isfile(el.path):\n",
"exception = None\... | [
0,
1,
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'",
"For",
"For",
"Return'",
"Condition",
"Assign'",
"For",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"For",
"Condition",
"Condition",
"Condition",
"Expr'",
"Condition",
"... |
[
"@bot.message_handler(content_types=['photo'])...\n",
"VAR_7 = users.find_one(VAR_1)\n",
"bot.send_message(VAR_7.chat_id, messages[VAR_7.language]['as_file'])\n",
"log.info('%s sent photo as a photo.', VAR_7)\n"
] | [
"@bot.message_handler(content_types=['photo'])...\n",
"user = users.find_one(message)\n",
"bot.send_message(user.chat_id, messages[user.language]['as_file'])\n",
"log.info('%s sent photo as a photo.', user)\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_12(self, VAR_10, VAR_12, **VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = {}\n",
"VAR_5['volumeName'] = VAR_10['name']\n",
"VAR_5['serverName'] = VAR_12['host']\n",
"self._cliq_run_xml('unassignVolumeToServer', VAR_5)\n"
] | [
"def terminate_connection(self, volume, connector, **kwargs):...\n",
"\"\"\"docstring\"\"\"\n",
"cliq_args = {}\n",
"cliq_args['volumeName'] = volume['name']\n",
"cliq_args['serverName'] = connector['host']\n",
"self._cliq_run_xml('unassignVolumeToServer', cliq_args)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_3():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_7 = {}\n",
"for arg in request.args:\n",
"VAR_8 = re.findall('_oc_(.*)', arg)\n",
"return VAR_7\n",
"if VAR_8:\n",
"VAR_7[VAR_8[0]] = request.args.get(arg), request.args.get('_od_' + VAR_8[0])\n"
] | [
"def get_order_args():...\n",
"\"\"\"docstring\"\"\"\n",
"orders = {}\n",
"for arg in request.args:\n",
"re_match = re.findall('_oc_(.*)', arg)\n",
"return orders\n",
"if re_match:\n",
"orders[re_match[0]] = request.args.get(arg), request.args.get('_od_' +\n re_match[0])\n"
] | [
0,
0,
0,
0,
0,
0,
0,
4
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Assign'"
] |
[
"def FUNC_2(self):...\n",
"VAR_1 = VAR_0.copy()\n",
"VAR_2 = self._get(VAR_1)\n",
"self.assertEqual(VAR_2.status_code, 302)\n",
"self.assertEqual(User.objects.count(), 2)\n",
"VAR_3 = User.objects.get(username='teekkarit@aalto.fi')\n",
"self.assertEqual(VAR_3.email, 'teemu.teekkari@aalto.fi')\n",
"sel... | [
"def test_valid_new(self):...\n",
"meta = DEF_SHIBD_META.copy()\n",
"response = self._get(meta)\n",
"self.assertEqual(response.status_code, 302)\n",
"self.assertEqual(User.objects.count(), 2)\n",
"user = User.objects.get(username='teekkarit@aalto.fi')\n",
"self.assertEqual(user.email, 'teemu.teekkari@aa... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_15 = time.time()\n",
"VAR_16 = []\n",
"VAR_17 = ((VAR_8, remove) for VAR_8, (t, remove) in self.last_alive.\n iteritems() if VAR_15 - t > VAR_3)\n",
"for VAR_8, remove in VAR_17:\n",
"if remove:\n",
"for VAR_8 in VAR_16:\n",
"VAR_16.append... | [
"def _keepalive(self):...\n",
"\"\"\"docstring\"\"\"\n",
"now = time.time()\n",
"to_remove = []\n",
"keep_alives = ((csessid, remove) for csessid, (t, remove) in self.\n last_alive.iteritems() if now - t > _KEEPALIVE)\n",
"for csessid, remove in keep_alives:\n",
"if remove:\n",
"for csessid in to_r... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"For",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"For",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Assign'"
] |
[
"@VAR_0.route('/cities/<city_id>', methods=['GET'])...\n",
"return get_by_id('cities', VAR_3)\n"
] | [
"@locations.route('/cities/<city_id>', methods=['GET'])...\n",
"return get_by_id('cities', city_id)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_5(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = '/api/apps'\n",
"VAR_5 = {'id': 'autotest'}\n",
"VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n",
"self.assertEqual(VAR_3.status_code, 201)\n",
"VAR_4 = VAR_3.data['id']\n",
"VAR_6 = os.path.join... | [
"def test_app_release_notes_in_logs(self):...\n",
"\"\"\"docstring\"\"\"\n",
"url = '/api/apps'\n",
"body = {'id': 'autotest'}\n",
"response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_14(VAR_17, VAR_14=None):...\n",
"VAR_55 = FUNC_15(VAR_17)\n",
"for VAR_28 in VAR_55:\n",
"if re.search(VAR_28, VAR_14, re.IGNORECASE):\n",
"return False\n",
"return True\n"
] | [
"def player_in_bracket(player, bracket=None):...\n",
"tags = get_coalesce_tags(player)\n",
"for tag in tags:\n",
"if re.search(tag, bracket, re.IGNORECASE):\n",
"return False\n",
"return True\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_5(self, *VAR_2, **VAR_1):...\n",
"VAR_1 = self._set_xsrf_headers(VAR_1)\n",
"VAR_0 = super(CLASS_0, self).delete(*VAR_2, **kwargs)\n",
"self._store_xsrf_token(VAR_0)\n",
"return VAR_0\n"
] | [
"def delete(self, *args, **kwargs):...\n",
"kwargs = self._set_xsrf_headers(kwargs)\n",
"response = super(Session, self).delete(*args, **kwargs)\n",
"self._store_xsrf_token(response)\n",
"return response\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_0(self, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_9 = os.path.join(VAR_1, 'saml2_settings.py')\n",
"VAR_2.update({'TOKEN_SERVICE_URL': 'http://login', 'SAML2_SETTINGS_MODULE':\n VAR_9, 'NO_AUTHN_URLS': ['^/test$']})\n",
"return VAR_2\n"
] | [
"def update_config(self, config):...\n",
"\"\"\"docstring\"\"\"\n",
"saml_config = os.path.join(HERE, 'saml2_settings.py')\n",
"config.update({'TOKEN_SERVICE_URL': 'http://login', 'SAML2_SETTINGS_MODULE':\n saml_config, 'NO_AUTHN_URLS': ['^/test$']})\n",
"return config\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_27(self, VAR_15):...\n",
""
] | [
"def add(self, item):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_12(self, **VAR_2):...\n",
"VAR_27 = super().get_context_data(**kwargs)\n",
"VAR_27['header'] = self.header\n",
"VAR_27['filter'] = self.filter\n",
"VAR_27['is_filtered'] = self.is_filtered\n",
"return VAR_27\n"
] | [
"def get_context_data(self, **kwargs):...\n",
"context = super().get_context_data(**kwargs)\n",
"context['header'] = self.header\n",
"context['filter'] = self.filter\n",
"context['is_filtered'] = self.is_filtered\n",
"return context\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_17(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.master = SosNode(self.config['master'], self.config)\n",
"self.log_debug('Failed to connect to master: %s' % e)\n",
"self._exit(\"\"\"Could not connect to master node.\nAborting...\"\"\", 1)\n"
] | [
"def connect_to_master(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.master = SosNode(self.config['master'], self.config)\n",
"self.log_debug('Failed to connect to master: %s' % e)\n",
"self._exit(\"\"\"Could not connect to master node.\nAborting...\"\"\", 1)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_12(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_24 = self.getfile(VAR_21)\n",
"return False\n",
"return VAR_24[VAR_2] == VAR_11\n"
] | [
"def islink(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"f = self.getfile(path)\n",
"return False\n",
"return f[A_TYPE] == T_LINK\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'",
"Return'"
] |
[
"def FUNC_8(self):...\n",
"VAR_7 = BokChoyTestSuite('', serversonly=True)\n",
"self.assertEqual(VAR_7.cmd, '')\n"
] | [
"def test_serversonly(self):...\n",
"suite = BokChoyTestSuite('', serversonly=True)\n",
"self.assertEqual(suite.cmd, '')\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_15(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.opt:\n",
"self.parse_args(VAR_16=False)\n",
"VAR_35 = {}\n",
"for VAR_39, VAR_0 in self.opt.items():\n",
"VAR_35[VAR_38(VAR_39)] = VAR_38(VAR_0)\n",
"for group in self._action_groups:\n",
"VAR_40 = {a.dest: getattr(self.args, a.dest,... | [
"def print_args(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.opt:\n",
"self.parse_args(print_args=False)\n",
"values = {}\n",
"for key, value in self.opt.items():\n",
"values[str(key)] = str(value)\n",
"for group in self._action_groups:\n",
"group_dict = {a.dest: getattr(self.args, a.dest, ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Assign'",
"For",
"Assign'",
"For",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Condition",
"Expr'",
"AugAssign'",
"Expr'"
] |
[
"def FUNC_7(VAR_12):...\n",
"VAR_3.execute('SELECT * FROM games WHERE ID = %i' % VAR_12)\n",
"VAR_12 = VAR_3.fetchone()\n",
"return VAR_12\n"
] | [
"def getGameID(ID):...\n",
"db.execute('SELECT * FROM games WHERE ID = %i' % ID)\n",
"ID = db.fetchone()\n",
"return ID\n"
] | [
0,
4,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Return'"
] |
[
"import json\n",
"import time\n",
"import pytest\n",
"from pytest_bdd import scenario, then, parsers\n",
"from tests import kube_utils\n",
"from tests import utils\n",
"@scenario('../features/pods_alive.feature', 'List Pods')...\n",
"@scenario('../features/pods_alive.feature', 'Exec in Pods')...\n",
... | [
"import json\n",
"import time\n",
"import pytest\n",
"from pytest_bdd import scenario, then, parsers\n",
"from tests import kube_utils\n",
"from tests import utils\n",
"@scenario('../features/pods_alive.feature', 'List Pods')...\n",
"@scenario('../features/pods_alive.feature', 'Exec in Pods')...\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
2,
2,
2,
0,
0,
0,
0,
2,
2,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Condition",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assert'",
"Condition",
"Assign'",
"Assert'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"FunctionDef'",
"Assign'",
"As... |
[
"def __str__(self):...\n",
"return str(self.raw_chem_name) if self.raw_chem_name else ''\n"
] | [
"def __str__(self):...\n",
"return str(self.raw_chem_name) if self.raw_chem_name else ''\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_4(self, VAR_3):...\n",
"VAR_11 = VAR_3.split(',')\n",
"VAR_8 = 'ORDER BY '\n",
"for part in VAR_11:\n",
"VAR_8 += part[1:]\n",
"return VAR_8.rstrip(', ')\n",
"if part[0] == '-':\n",
"VAR_8 += ' DESC, '\n",
"VAR_8 += ' ASC, '\n"
] | [
"def create_sort_by(self, sort_by):...\n",
"parts = sort_by.split(',')\n",
"sql = 'ORDER BY '\n",
"for part in parts:\n",
"sql += part[1:]\n",
"return sql.rstrip(', ')\n",
"if part[0] == '-':\n",
"sql += ' DESC, '\n",
"sql += ' ASC, '\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"AugAssign'",
"Return'",
"Condition",
"AugAssign'",
"AugAssign'"
] |
[
"def FUNC_2(VAR_1, VAR_2, *VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_2:\n",
"if not VAR_2.startswith('test_'):\n",
"VAR_15 = [method for method in dir(VAR_1) if method.startswith('test_')]\n",
"VAR_2 = 'test_%s' % VAR_2\n",
"VAR_15 = [VAR_2]\n",
"return unittest.TestSuite([VAR_1(VAR_2, *VAR_3)... | [
"def load_tests(testclass, name, *args):...\n",
"\"\"\"docstring\"\"\"\n",
"if name:\n",
"if not name.startswith('test_'):\n",
"names = [method for method in dir(testclass) if method.startswith('test_')]\n",
"name = 'test_%s' % name\n",
"names = [name]\n",
"return unittest.TestSuite([testclass(name, *... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_0(self):...\n",
"def FUNC_33(self):...\n",
"@api.public...\n",
"@api.require(lambda : True)...\n"
] | [
"def test_good(self):...\n",
"def some_other_method(self):...\n",
"@api.public...\n",
"@api.require(lambda : True)...\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Condition",
"Condition"
] |
[
"def FUNC_9():...\n",
"if VAR_4 == VAR_5:\n",
"VAR_14 = 'string' % (VAR_4, VAR_5, VAR_5, VAR_4)\n",
"VAR_7.execute(VAR_14)\n",
"if VAR_7.fetchone()[0] > 0:\n"
] | [
"def _checkPairing():...\n",
"if winner == loser:\n",
"q = (\n \"\"\"\n SELECT COUNT(*) FROM matches\n WHERE (matches.winner_id = %s AND matches.loser_id = %s)\n OR (matches.winner_id = %s AND matches.loser_id = %s);\n \"\"\"\n % (winner, loser, loser, winner))\n",
"cu... | [
0,
0,
4,
4,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Expr'",
"Condition"
] |
[
"def __lt__(self, VAR_16):...\n",
"VAR_39 = self.workflow._ruleorder.compare(self, VAR_16)\n",
"return VAR_39 < 0\n"
] | [
"def __lt__(self, rule):...\n",
"comp = self.workflow._ruleorder.compare(self, rule)\n",
"return comp < 0\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_29(VAR_13):...\n",
""
] | [
"def failing(request):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_42(self):...\n",
"VAR_32 = list()\n",
"for VAR_14 in self.get_columns_list():\n",
"if not self.is_relation(VAR_14):\n",
"return VAR_32\n",
"VAR_38 = self.get_property_first_col(VAR_14).name\n",
"VAR_32.append(VAR_14)\n",
"if not self.is_pk(VAR_38) and not self.is_fk(VAR_38) and not self.is_i... | [
"def get_search_columns_list(self):...\n",
"ret_lst = list()\n",
"for col_name in self.get_columns_list():\n",
"if not self.is_relation(col_name):\n",
"return ret_lst\n",
"tmp_prop = self.get_property_first_col(col_name).name\n",
"ret_lst.append(col_name)\n",
"if not self.is_pk(tmp_prop) and not self.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Condition",
"Return'",
"Assign'",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_2(self, VAR_6):...\n",
"\"\"\"docstring\"\"\"\n",
"g.oidc_id_token = VAR_6\n",
"g.oidc_id_token_dirty = True\n"
] | [
"def set_cookie_id_token(self, id_token):...\n",
"\"\"\"docstring\"\"\"\n",
"g.oidc_id_token = id_token\n",
"g.oidc_id_token_dirty = True\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'"
] |
[
"def FUNC_3(self):...\n",
"VAR_7.environ['SWARMING_LOAD_TEST'] = '1'\n",
"self.assertEqual(['id', 'load_test'], sorted(bot_main.get_dimensions(None)))\n"
] | [
"def test_get_dimensions_load_test(self):...\n",
"os.environ['SWARMING_LOAD_TEST'] = '1'\n",
"self.assertEqual(['id', 'load_test'], sorted(bot_main.get_dimensions(None)))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_30(self, VAR_47):...\n",
"VAR_69, VAR_73 = self.put('/mails', VAR_47)\n",
"return VAR_69, VAR_73\n"
] | [
"def put_mail(self, data):...\n",
"res, req = self.put('/mails', data)\n",
"return res, req\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_1():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = {}\n",
"for arg in request.args:\n",
"VAR_8 = re.findall('page_(.*)', arg)\n",
"return VAR_5\n",
"if VAR_8:\n",
"VAR_5[VAR_8[0]] = int(request.args.get(arg))\n"
] | [
"def get_page_args():...\n",
"\"\"\"docstring\"\"\"\n",
"pages = {}\n",
"for arg in request.args:\n",
"re_match = re.findall('page_(.*)', arg)\n",
"return pages\n",
"if re_match:\n",
"pages[re_match[0]] = int(request.args.get(arg))\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Assign'"
] |
[
"def FUNC_13(VAR_9, VAR_7, VAR_11, VAR_10):...\n",
"if VAR_11 == 'POST':\n",
"return CLASS_0.session.post(FUNC_2(VAR_7), VAR_9=ToUtf8Json(data), headers=\n _HEADERS, VAR_10=timeout)\n",
"if VAR_11 == 'GET':\n",
"return CLASS_0.session.get(FUNC_2(VAR_7), headers=_HEADERS, VAR_10=timeout)\n"
] | [
"def SendRequest(data, handler, method, timeout):...\n",
"if method == 'POST':\n",
"return BaseRequest.session.post(_BuildUri(handler), data=ToUtf8Json(data),\n headers=_HEADERS, timeout=timeout)\n",
"if method == 'GET':\n",
"return BaseRequest.session.get(_BuildUri(handler), headers=_HEADERS,\n timeo... | [
0,
0,
7,
0,
7
] | [
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'"
] |
[
"def __eq__(self, VAR_1):...\n",
"if not isinstance(VAR_1, CLASS_0):\n",
"return False\n",
"return self._uuid == VAR_1._uuid\n"
] | [
"def __eq__(self, other):...\n",
"if not isinstance(other, Host):\n",
"return False\n",
"return self._uuid == other._uuid\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_39(VAR_7, VAR_30=None):...\n",
"if 'challonge' in VAR_7:\n",
"VAR_12, VAR_113 = FUNC_5(VAR_7)\n",
"VAR_97 = constants.DISPLAY_MAP\n",
"VAR_46 = BeautifulSoup(VAR_12, 'html.parser')\n",
"for k in VAR_97:\n",
"VAR_114 = VAR_46.find('div', {'id': 'title'})\n",
"if k.lower() in VAR_7.lower():\n"... | [
"def get_display_base(url, counter=None):...\n",
"if 'challonge' in url:\n",
"html, _ = hit_url(url)\n",
"d_map = constants.DISPLAY_MAP\n",
"soup = BeautifulSoup(html, 'html.parser')\n",
"for k in d_map:\n",
"display_name = soup.find('div', {'id': 'title'})\n",
"if k.lower() in url.lower():\n",
"if ... | [
0,
0,
0,
0,
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'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'",
"Return'",
"Return'",
"Conditi... |
[
"def FUNC_4(VAR_15, VAR_16):...\n",
"VAR_33 = {}\n",
"for in_file, VAR_45 in VAR_15:\n",
"VAR_33[VAR_45] = FUNC_5(in_file, VAR_16)\n",
"return VAR_33\n"
] | [
"def build_tree(templates, config):...\n",
"res = {}\n",
"for in_file, out_file in templates:\n",
"res[out_file] = render_template(in_file, config)\n",
"return res\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'"
] |
[
"def __init__(self):...\n",
"self.content = None\n",
"self.filled = False\n",
"def FUNC_0(self, VAR_0):...\n",
"if VAR_0 == 'L':\n",
"self.content = 'L'\n",
"if VAR_0 == 'R':\n",
"self.filled = True\n",
"self.content = 'R'\n",
"self.content = VAR_0\n",
"def FUNC_1(self):...\n",
"self.filled = ... | [
"def __init__(self):...\n",
"self.content = None\n",
"self.filled = False\n",
"def set(self, content):...\n",
"if content == 'L':\n",
"self.content = 'L'\n",
"if content == 'R':\n",
"self.filled = True\n",
"self.content = 'R'\n",
"self.content = content\n",
"def get(self):...\n",
"self.filled ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"FunctionDef'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_15(VAR_8):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_13 = None\n",
"VAR_11 = None\n",
"VAR_33 = (\n \"host='localhost' dbname='data1000' user='postgres' password='postgres'\")\n",
"print(error)\n",
"if VAR_13 is not None:\n",
"print('Connecting to the PostgreSQL database...')\n",
"VAR_13.c... | [
"def queryAll(query):...\n",
"\"\"\"docstring\"\"\"\n",
"conn = None\n",
"result = None\n",
"conn_string = (\n \"host='localhost' dbname='data1000' user='postgres' password='postgres'\")\n",
"print(error)\n",
"if conn is not None:\n",
"print('Connecting to the PostgreSQL database...')\n",
"conn.c... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Return'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"self._check_key(VAR_0)\n"
] | [
"def test_rsa_key(self):...\n",
"self._check_key(RSA_PUBKEY)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_0(self, VAR_5):...\n",
"VAR_14 = 'string'.format(VAR_5)\n",
"self.cur.execute(VAR_14)\n",
"return self.cur.fetchall()\n"
] | [
"def get_roster(self, server_id):...\n",
"sql = (\n \"\"\"SELECT username, role\n FROM roles\n WHERE roles.server_id = {0};\n \"\"\"\n .format(server_id))\n",
"self.cur.execute(sql)\n",
"return self.cur.fetchall()\n"
] | [
0,
4,
4,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_8(self):...\n",
"VAR_21 = self.agent.type_to_payload('deleteGoogleLoadBalancerDescription',\n {'region': self.bindings['TEST_GCE_REGION'], 'credentials': self.\n bindings['GCE_CREDENTIALS'], 'loadBalancerName': self.__use_lb_name})\n",
"VAR_20 = gcp.GceContractBuilder(self.gce_observer)\n",
"V... | [
"def delete_load_balancer(self):...\n",
"payload = self.agent.type_to_payload('deleteGoogleLoadBalancerDescription',\n {'region': self.bindings['TEST_GCE_REGION'], 'credentials': self.\n bindings['GCE_CREDENTIALS'], 'loadBalancerName': self.__use_lb_name})\n",
"builder = gcp.GceContractBuilder(self.gce_ob... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"@VAR_1.route('/get_common_ingredients_with/<ingredient>')...\n",
"VAR_28 = VAR_3.query_common_ingredients_with(VAR_10)\n",
"if VAR_28 == -1:\n",
"return None\n",
"return VAR_28\n"
] | [
"@app.route('/get_common_ingredients_with/<ingredient>')...\n",
"result = database.query_common_ingredients_with(ingredient)\n",
"if result == -1:\n",
"return None\n",
"return result\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_6(self):...\n",
"self.uut.gives_corrected = True\n",
"VAR_1 = tuple(self.uut.process_output(['a', 'b'], 'filename', ['a', 'b']))\n",
"self.assertEqual((), VAR_1)\n",
"VAR_1 = tuple(self.uut.process_output(['a', 'b'], 'filename', ['a']))\n",
"self.assertEqual(len(VAR_1), 1)\n"
] | [
"def test_gives_corrected(self):...\n",
"self.uut.gives_corrected = True\n",
"out = tuple(self.uut.process_output(['a', 'b'], 'filename', ['a', 'b']))\n",
"self.assertEqual((), out)\n",
"out = tuple(self.uut.process_output(['a', 'b'], 'filename', ['a']))\n",
"self.assertEqual(len(out), 1)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"@staticmethod...\n",
"return VAR_82\n"
] | [
"@staticmethod...\n",
"return f\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_4(self):...\n",
"VAR_3 = reverse('users:update')\n",
"VAR_4 = {'purchase_step_form': {'purchase_step': PS_DAP},\n 'marital_status_form': {'status': SC_SI}, 'first_home_form': {\n 'firsthome': True}, 'house_type_form': {'house_type': HT_SF,\n 'house_age': HA_15, 'house_cond': HC_SL}, 'city_for... | [
"def test_updating_user_info(self):...\n",
"update_url = reverse('users:update')\n",
"data = {'purchase_step_form': {'purchase_step': PS_DAP},\n 'marital_status_form': {'status': SC_SI}, 'first_home_form': {\n 'firsthome': True}, 'house_type_form': {'house_type': HT_SF,\n 'house_age': HA_15, 'house_con... | [
0,
0,
0,
6,
0,
0,
0,
0,
0,
6,
6,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"For",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr... |
[
"def __init__(self, VAR_7, VAR_14, *VAR_15, **VAR_16):...\n",
"CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n",
"self._error = VAR_14\n"
] | [
"def __init__(self, param, error, *a, **kw):...\n",
"Validator.__init__(self, param, *a, **kw)\n",
"self._error = error\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"def FUNC_14(VAR_24=sys.argv):...\n",
"VAR_39 = FUNC_12(VAR_24)\n",
"if VAR_39.print_templates:\n",
"print(VAR_39.templates)\n",
"if not VAR_39.metadata:\n",
"return 0\n",
"if 'OS_CONFIG_FILES' in os.environ:\n",
"if VAR_39.templates is None:\n",
"VAR_28.error(e)\n",
"return 0\n",
"VAR_39.metada... | [
"def main(argv=sys.argv):...\n",
"opts = parse_opts(argv)\n",
"if opts.print_templates:\n",
"print(opts.templates)\n",
"if not opts.metadata:\n",
"return 0\n",
"if 'OS_CONFIG_FILES' in os.environ:\n",
"if opts.templates is None:\n",
"logger.error(e)\n",
"return 0\n",
"opts.metadata = os.environ[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Return'",
"Condition",
"Condition",
"Expr'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"@api.model...\n",
"VAR_58 = self.env['phone.common'].get_record_from_phone_number(VAR_42)\n",
"if VAR_58:\n",
"VAR_54 = self.browse(VAR_58[1])\n",
"return VAR_58 and VAR_54.lang\n"
] | [
"@api.model...\n",
"record = self.env['phone.common'].get_record_from_phone_number(phone)\n",
"if record:\n",
"partner = self.browse(record[1])\n",
"return record and partner.lang\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"@memoized_property...\n",
"return NativeToolchain.scoped_instance(self)\n"
] | [
"@memoized_property...\n",
"return NativeToolchain.scoped_instance(self)\n"
] | [
0,
0
] | [
"Condition",
"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_6(VAR_9, VAR_8):...\n",
"VAR_10 = {}\n",
"for VAR_7 in VAR_9:\n",
"VAR_10[VAR_7] = FUNC_5(VAR_7, VAR_8)\n",
"return OrderedDict(sorted(VAR_10.items(), key=itemgetter(1)))\n"
] | [
"def generate_syscalls(syscall_names, bitness):...\n",
"syscalls = {}\n",
"for syscall_name in syscall_names:\n",
"syscalls[syscall_name] = get_syscall_number(syscall_name, bitness)\n",
"return OrderedDict(sorted(syscalls.items(), key=itemgetter(1)))\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Return'"
] |
[
"def FUNC_14(self, VAR_17):...\n",
"VAR_21 = fs.split_path(VAR_17.path)\n",
"VAR_22 = len(VAR_21)\n",
"VAR_23 = min(self._lensplitpath, VAR_22)\n",
"VAR_24 = self._splitpath[:VAR_23] == VAR_21 and VAR_22 <= self._lensplitpath\n",
"if VAR_24 and VAR_22 not in self._store:\n",
"self._store[VAR_22] = []\n"... | [
"def does_intersect_path(self, pathctx):...\n",
"testpath = fs.split_path(pathctx.path)\n",
"lentestpath = len(testpath)\n",
"lenpath = min(self._lensplitpath, lentestpath)\n",
"does_pass = self._splitpath[:lenpath\n ] == testpath and lentestpath <= self._lensplitpath\n",
"if does_pass and lentestpath ... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"\"\"\"string\"\"\"\n",
"import sys\n",
"import citest.aws_testing as aws\n",
"import citest.json_contract as jc\n",
"import citest.service_testing as st\n",
"import spinnaker_testing as sk\n",
"import spinnaker_testing.gate as gate\n",
"\"\"\"string\"\"\"\n",
"@classmethod...\n",
"\"\"\"docstring... | [
"\"\"\"\nSmoke test to see if Spinnaker can interoperate with Amazon Web Services.\n\nSee testable_service/integration_test.py and spinnaker_testing/spinnaker.py\nfor more details.\n\nThe smoke test will use ssh to peek at the spinnaker configuration\nto determine the managed project it should verify, and to determ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Expr'",
"Condition",
"Docstring",
"Return'"
] |
[
"@staticmethod...\n",
"if VAR_6.last_run_at:\n",
"return VAR_6.schedule.remaining_estimate(last_run_at=obj.last_run_at)\n",
"VAR_23, VAR_24 = VAR_6.schedule.is_due(last_run_at=datetime.now(pytz.utc))\n",
"VAR_25 = datetime.now(pytz.utc) + timedelta(seconds=y)\n",
"return naturaltime(VAR_25)\n"
] | [
"@staticmethod...\n",
"if obj.last_run_at:\n",
"return obj.schedule.remaining_estimate(last_run_at=obj.last_run_at)\n",
"z, y = obj.schedule.is_due(last_run_at=datetime.now(pytz.utc))\n",
"date = datetime.now(pytz.utc) + timedelta(seconds=y)\n",
"return naturaltime(date)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_17(self, VAR_9, VAR_7):...\n",
"VAR_19 = self._stop_events[VAR_7]\n",
"VAR_20 = subprocess.Popen(VAR_9, stdin=subprocess.PIPE, stdout=subprocess.\n PIPE, stderr=subprocess.PIPE, shell=True)\n",
"VAR_21 = '\\x1b[2K\\x1b[0'\n",
"VAR_22 = (\n '\\x1b[2K\\x1b[A\\x1b[2K\\x1b[A\\x1b[2K\\x1b[A\\x1b[... | [
"def __execute_interactive(self, command, job_id):...\n",
"stop_event = self._stop_events[job_id]\n",
"process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=\n subprocess.PIPE, stderr=subprocess.PIPE, shell=True)\n",
"reset_sequence1 = '\\x1b[2K\\x1b[0'\n",
"reset_sequence2 = (\n '\\x1b[2K... | [
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
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"For",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"... |
[
"def FUNC_8(self, VAR_9):...\n",
"if self.count:\n",
"self.scope['results'][start_url] += VAR_9['results'][start_url]\n",
"self.scope = VAR_9\n",
"self.count += 1\n"
] | [
"def updateScope(self, scope):...\n",
"if self.count:\n",
"self.scope['results'][start_url] += scope['results'][start_url]\n",
"self.scope = scope\n",
"self.count += 1\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"AugAssign'",
"Assign'",
"AugAssign'"
] |
[
"def FUNC_2(self):...\n",
"self.set_titlebar(self.headerbar)\n"
] | [
"def set_headerbar(self):...\n",
"self.set_titlebar(self.headerbar)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_9(VAR_11):...\n",
"return ray.ObjectID(VAR_11)\n"
] | [
"def binary_to_object_id(binary_object_id):...\n",
"return ray.ObjectID(binary_object_id)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_0(VAR_1, VAR_2, VAR_3, VAR_4=True):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_5 = VAR_2.course_instance\n",
"if VAR_5.technical_error_emails:\n",
"VAR_9 = VAR_5.technical_error_emails.split(',')\n",
"VAR_9 = (p.user.email for p in VAR_5.course.teachers.all() if p.user.email)\n",
"VAR_6 = '-'\n",
... | [
"def email_course_error(request, exercise, message, exception=True):...\n",
"\"\"\"docstring\"\"\"\n",
"instance = exercise.course_instance\n",
"if instance.technical_error_emails:\n",
"recipients = instance.technical_error_emails.split(',')\n",
"recipients = (p.user.email for p in instance.course.teacher... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(VAR_7=None, VAR_8=0, VAR_9=0):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_7 is None:\n",
"return True\n",
"return False\n",
"VAR_21 = re.match('^([^;]+)(; length=([0-9]+))?$', VAR_7, re.IGNORECASE)\n",
"VAR_22 = parse_http_date(VAR_21.group(1))\n",
"VAR_23 = VAR_21.group(3)\n",
"if VAR_23... | [
"def was_modified_since(header=None, mtime=0, size=0):...\n",
"\"\"\"docstring\"\"\"\n",
"if header is None:\n",
"return True\n",
"return False\n",
"matches = re.match('^([^;]+)(; length=([0-9]+))?$', header, re.IGNORECASE)\n",
"header_mtime = parse_http_date(matches.group(1))\n",
"header_len = matche... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.