lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_7(self):...\n", "VAR_13 = FUNC_0(self.groups['path'])\n", "if self.groups['path'] != VAR_13:\n", "self.response.headers.set('Location', self.remote + VAR_13)\n", "self.filename = self.local + urllib.parse.unquote(self.groups['path'])\n", "return 307, ''\n", "return VAR_5.respond(self)\n" ]
[ "def respond(self):...\n", "norm_request = normpath(self.groups['path'])\n", "if self.groups['path'] != norm_request:\n", "self.response.headers.set('Location', self.remote + norm_request)\n", "self.filename = self.local + urllib.parse.unquote(self.groups['path'])\n", "return 307, ''\n", "return handler...
[ 0, 0, 0, 0, 1, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "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(VAR_0, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_0.execute(VAR_4)\n", "VAR_0.connection.rollback()\n", "return VAR_0.fetchall()\n", "return None\n" ]
[ "def get_data(cur, query):...\n", "\"\"\"docstring\"\"\"\n", "cur.execute(query)\n", "cur.connection.rollback()\n", "return cur.fetchall()\n", "return None\n" ]
[ 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_2(self, VAR_0: str):...\n", "VAR_4 = get_json_request_body(self)\n", "VAR_2 = VAR_4.get('submitters', None)\n", "VAR_5 = VAR_4.get('filters', None)\n", "VAR_3 = api.submission.get_all(VAR_0, email=get_email(self), submitters=\n subs, VAR_5=filters)\n", "self.write(VAR_3)\n" ]
[ "def post(self, survey_id: str):...\n", "body = get_json_request_body(self)\n", "subs = body.get('submitters', None)\n", "filters = body.get('filters', None)\n", "response = api.submission.get_all(survey_id, email=get_email(self),\n submitters=subs, filters=filters)\n", "self.write(response)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_1(self, **VAR_34):...\n", "\"\"\"docstring\"\"\"\n", "for arg in VAR_34:\n", "if hasattr(self, arg):\n", "self._check_usage()\n", "if getattr(self, arg) is None:\n", "setattr(self, arg, VAR_34[arg])\n" ]
[ "def update_if_absent(self, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "for arg in kwargs:\n", "if hasattr(self, arg):\n", "self._check_usage()\n", "if getattr(self, arg) is None:\n", "setattr(self, arg, kwargs[arg])\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_0(self, VAR_4, VAR_5, VAR_6=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_14 = []\n", "for VAR_43, v in VAR_5.items():\n", "VAR_14.append(' %s=%s' % (VAR_43, v))\n", "VAR_15 = VAR_4 + ''.join(VAR_14)\n", "return self._run_ssh(VAR_15, VAR_6)\n" ]
[ "def _cliq_run(self, verb, cliq_args, check_exit_code=True):...\n", "\"\"\"docstring\"\"\"\n", "cliq_arg_strings = []\n", "for k, v in cliq_args.items():\n", "cliq_arg_strings.append(' %s=%s' % (k, v))\n", "cmd = verb + ''.join(cliq_arg_strings)\n", "return self._run_ssh(cmd, check_exit_code)\n" ]
[ 0, 0, 2, 0, 2, 2, 2 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_11(self, VAR_14):...\n", "" ]
[ "def is_integer(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_4(VAR_4, VAR_5):...\n", "VAR_11 = f\"\"\"\n SELECT COUNT(p.id) AS total\n FROM products AS p INNER JOIN {VAR_1} AS pt ON\n p.product_type_id=pt.id\n WHERE p.rating >= {VAR_4['rating']}\n AND pt.name = '{VAR_5}'\n \"\"\"\n", "VAR_12 = cr...
[ "def get_total_departments_products(filters, department):...\n", "sql_query = f\"\"\"\n SELECT COUNT(p.id) AS total\n FROM products AS p INNER JOIN {PRODUCTS_TYPES_TABLE} AS pt ON\n p.product_type_id=pt.id\n WHERE p.rating >= {filters['rating']}\n AND pt.name...
[ 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "from django import forms\n", "VAR_0 = forms.CharField(label='', max_length=100, required=True)\n", "VAR_0.widget.attrs['class'] = 'form-control mr-sm-2 my-2'\n", "VAR_0.widget.attrs['placeholder'] = 'Lookup IP Address'\n" ]
[ "from django import forms\n", "keyword = forms.CharField(label='', max_length=100, required=True)\n", "keyword.widget.attrs['class'] = 'form-control mr-sm-2 my-2'\n", "keyword.widget.attrs['placeholder'] = 'Lookup IP Address'\n" ]
[ 0, 6, 0, 0 ]
[ "ImportFrom'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_6():...\n", "VAR_20 = db.Filesystem.get_content(VAR_4)\n", "VAR_6.set_result(VAR_20)\n" ]
[ "def inquire_data_async():...\n", "_tf_data = db.Filesystem.get_content(file_path)\n", "future.set_result(_tf_data)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_13(self):...\n", "self.run_test_case(self.scenario.delete_load_balancer(), max_retries=5)\n" ]
[ "def test_y_delete_load_balancer(self):...\n", "self.run_test_case(self.scenario.delete_load_balancer(), max_retries=5)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_13(self, VAR_9, VAR_7):...\n", "if not self.doctype:\n", "return VAR_9\n", "if not isinstance(VAR_9, CLASS_0):\n", "if 'doctype' not in VAR_9:\n", "VAR_9.parent = self.name\n", "VAR_9['doctype'] = self.get_table_field_doctype(VAR_7)\n", "VAR_9 = FUNC_0(VAR_9['doctype'])(VAR_9)\n", "VAR_9.p...
[ "def _init_child(self, value, key):...\n", "if not self.doctype:\n", "return value\n", "if not isinstance(value, BaseDocument):\n", "if 'doctype' not in value:\n", "value.parent = self.name\n", "value['doctype'] = self.get_table_field_doctype(key)\n", "value = get_controller(value['doctype'])(value)\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_4(self, VAR_9):...\n", "self.fields.append(VAR_9)\n", "cached_property.clear_caches(self)\n" ]
[ "def add_field(self, field):...\n", "self.fields.append(field)\n", "cached_property.clear_caches(self)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_11(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "return block.path_to_kname(VAR_1).startswith('dm') and FUNC_1(VAR_1\n ).startswith('CRYPT')\n" ]
[ "def identify_crypt(device):...\n", "\"\"\"docstring\"\"\"\n", "return block.path_to_kname(device).startswith('dm') and get_dmsetup_uuid(device\n ).startswith('CRYPT')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def __repr__(self):...\n", "return json_encode(self, sort_keys=True)\n" ]
[ "def __repr__(self):...\n", "return json_encode(self, sort_keys=True)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@property...\n", "VAR_28 = list(self.output)\n", "if self.benchmark:\n", "VAR_28.append(self.benchmark)\n", "return VAR_28\n" ]
[ "@property...\n", "products = list(self.output)\n", "if self.benchmark:\n", "products.append(self.benchmark)\n", "return products\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Return'" ]
[ "__author__ = 'Johannes Köster'\n", "__copyright__ = 'Copyright 2015, Johannes Köster'\n", "__email__ = 'koester@jimmy.harvard.edu'\n", "__license__ = 'MIT'\n", "import os\n", "import sys\n", "import base64\n", "import json\n", "from collections import defaultdict\n", "from itertools import chain\...
[ "__author__ = 'Johannes Köster'\n", "__copyright__ = 'Copyright 2015, Johannes Köster'\n", "__email__ = 'koester@jimmy.harvard.edu'\n", "__license__ = 'MIT'\n", "import os\n", "import sys\n", "import base64\n", "import json\n", "from collections import defaultdict\n", "from itertools import chain\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0 ]
[ "Assign'", "Assign'", "Assign'", "Assign'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Return'" ]
[ "def FUNC_2(self):...\n", "self.objects.extext.qa_edited = True\n", "VAR_1 = QANotes.objects.create(extracted_text=self.objects.extext)\n", "self.assertEqual(VAR_1.qa_notes, None)\n", "self.assertRaises(ValidationError, VAR_1.clean)\n" ]
[ "def test_extracted_text_qa_notes(self):...\n", "self.objects.extext.qa_edited = True\n", "note = QANotes.objects.create(extracted_text=self.objects.extext)\n", "self.assertEqual(note.qa_notes, None)\n", "self.assertRaises(ValidationError, note.clean)\n" ]
[ 0, 6, 6, 6, 6 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@hook.command(autohelp=False)...\n", "return FUNC_1(VAR_8, 'kick', VAR_4, VAR_5, VAR_1, VAR_6, VAR_7)\n" ]
[ "@hook.command(autohelp=False)...\n", "return process_vote(inp, 'kick', chan, mask, db, notice, conn)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_0(self, VAR_9='localhost', VAR_10='todo', VAR_11='todo', VAR_12='todo'...\n", "\"\"\"docstring\"\"\"\n", "self.__con = MySQLdb.connect(VAR_9, VAR_10, VAR_11, VAR_12)\n", "return CLASS_0.CANT_CONNECT\n", "self.__con.autocommit(True)\n", "return CLASS_0.SUCCESS\n" ]
[ "def connect(self, hostname='localhost', username='todo', password='todo',...\n", "\"\"\"docstring\"\"\"\n", "self.__con = MySQLdb.connect(hostname, username, password, database)\n", "return Database.CANT_CONNECT\n", "self.__con.autocommit(True)\n", "return Database.SUCCESS\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'", "Expr'", "Return'" ]
[ "def __init__(self):...\n", "self.order = list()\n" ]
[ "def __init__(self):...\n", "self.order = list()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "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'" ]
[ "@staticmethod...\n", "return CLASS_0._TalkToHandlerAsync(VAR_9, VAR_7, 'POST', VAR_10)\n" ]
[ "@staticmethod...\n", "return BaseRequest._TalkToHandlerAsync(data, handler, 'POST', timeout)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1):...\n", "VAR_12 = ''\n", "VAR_40 = VAR_41 = None\n", "if VAR_1.sort_field and ',' in VAR_1.sort_field:\n", "VAR_12 = ', '.join(['`tab{0}`.`{1}` {2}'.format(VAR_0, VAR_34.split()[0].\n strip(), VAR_34.split()[1].strip()) for VAR_34 in VAR_1.sort_field.\n split(',')])\n", "VA...
[ "def get_order_by(doctype, meta):...\n", "order_by = ''\n", "sort_field = sort_order = None\n", "if meta.sort_field and ',' in meta.sort_field:\n", "order_by = ', '.join(['`tab{0}`.`{1}` {2}'.format(doctype, f.split()[0].\n strip(), f.split()[1].strip()) for f in meta.sort_field.split(',')])\n", "sort_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'" ]
[ "from operator import itemgetter\n", "import psycopg2\n", "from psycopg2.extras import DictCursor\n", "from flask import Flask\n", "from flask import render_template\n", "from flask import request\n", "from gensim.models import Doc2Vec\n", "import re\n", "import argparse\n", "VAR_0 = Flask(__name_...
[ "from operator import itemgetter\n", "import psycopg2\n", "from psycopg2.extras import DictCursor\n", "from flask import Flask\n", "from flask import render_template\n", "from flask import request\n", "from gensim.models import Doc2Vec\n", "import re\n", "import argparse\n", "application = Flask(_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Assign'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "self.netatmo_data.update()\n", "VAR_13 = self.netatmo_data.data.get(self.module_name)\n", "if VAR_13 is None:\n", "VAR_0.warning('No data found for %s', self.module_name)\n", "if self.type == 'temperature':\n", "self._state = STATE_UNKNOWN\n", "s...
[ "def update(self):...\n", "\"\"\"docstring\"\"\"\n", "self.netatmo_data.update()\n", "data = self.netatmo_data.data.get(self.module_name)\n", "if data is None:\n", "_LOGGER.warning('No data found for %s', self.module_name)\n", "if self.type == 'temperature':\n", "self._state = STATE_UNKNOWN\n", "sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition"...
[ "def FUNC_0(self):...\n", "VAR_5 = database.users.get_current_user()\n", "if VAR_5:\n", "VAR_3 = db.get(db.Key.from_path('Item', int(self.request.get('item_id'))))\n", "self.redirect(self.request.referer)\n", "if VAR_3.created_by_id == VAR_5.user_id(\n", "database.logging.info('Deleting item with id %s'...
[ "def get(self):...\n", "user = database.users.get_current_user()\n", "if user:\n", "item = db.get(db.Key.from_path('Item', int(self.request.get('item_id'))))\n", "self.redirect(self.request.referer)\n", "if item.created_by_id == user.user_id(\n", "database.logging.info('Deleting item with id %s', item.k...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_6(VAR_7, VAR_4):...\n", "VAR_10 = (VAR_4['page'] - 1) * VAR_4['perPage']\n", "VAR_11 = f\"\"\"\n SELECT u.username, r.id, r.title, r.comment, r.rating, r.timestamp\n FROM {VAR_0} p, {VAR_2} r, {VAR_3} u\n WHERE p.id={VAR_7} && r.user_id=u.id && r.product_id=p.id\n ...
[ "def get_product_reviews(productId, filters):...\n", "offset = (filters['page'] - 1) * filters['perPage']\n", "sql_query = f\"\"\"\n SELECT u.username, r.id, r.title, r.comment, r.rating, r.timestamp\n FROM {PRODUCTS_TABLE} p, {REVIEWS_TABLE} r, {USERS_TABLE} u\n WHERE p.id={pro...
[ 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_9(self):...\n", "fork(['git', '--git-dir=%s/.git' % self.directory, '--work-tree=%s' % self.\n directory, 'status'])\n" ]
[ "def status(self):...\n", "fork(['git', '--git-dir=%s/.git' % self.directory, '--work-tree=%s' % self.\n directory, 'status'])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_14(self, VAR_21, VAR_11):...\n", "if VAR_0(VAR_11):\n", "VAR_37, VAR_41 = self.process_lhs(VAR_21, VAR_11)\n", "VAR_42, VAR_43 = self.process_rhs(VAR_21, VAR_11)\n", "assert len(VAR_43) == 1, _('A boolean must be provided as argument')\n", "VAR_4, *VAR_44 = VAR_43\n", "assert isinstance(VAR_4,...
[ "def as_sql(self, compiler, connection):...\n", "if is_postgresql(connection):\n", "lhs, lhs_params = self.process_lhs(compiler, connection)\n", "rhs, rhs_params = self.process_rhs(compiler, connection)\n", "assert len(rhs_params) == 1, _('A boolean must be provided as argument')\n", "value, *junk = rhs_p...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assert'", "Assign'", "Assert'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_6():...\n", "VAR_13.throw(_('Invalid Search Field'), VAR_13.DataError)\n" ]
[ "def _raise_exception():...\n", "frappe.throw(_('Invalid Search Field'), frappe.DataError)\n" ]
[ 0, 4 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.norun = True\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.norun = True\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_9(self):...\n", "VAR_5 = [{'loadBalancerName': self.__lb_name, 'networkLoadBalancerName':\n self.__lb_name, 'region': 'us-central1', 'type': 'deleteLoadBalancer',\n 'regions': ['us-central1'], 'credentials': self.bindings[\n 'GCE_CREDENTIALS'], 'cloudProvider': 'gce', 'user': 'integration-tests...
[ "def delete_load_balancer(self):...\n", "job = [{'loadBalancerName': self.__lb_name, 'networkLoadBalancerName': self\n .__lb_name, 'region': 'us-central1', 'type': 'deleteLoadBalancer',\n 'regions': ['us-central1'], 'credentials': self.bindings[\n 'GCE_CREDENTIALS'], 'cloudProvider': 'gce', 'user': 'inte...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "from __future__ import absolute_import, division, print_function, with_statement\n", "import os\n", "import sys\n", "import argparse\n", "if __name__ == '__main__':\n", "VAR_0 = argparse.ArgumentParser(description='See README')\n", "VAR_0.add_argument('-c', '--count', default=3, type=int, help=\n 'w...
[ "from __future__ import absolute_import, division, print_function, with_statement\n", "import os\n", "import sys\n", "import argparse\n", "if __name__ == '__main__':\n", "parser = argparse.ArgumentParser(description='See README')\n", "parser.add_argument('-c', '--count', default=3, type=int, help=\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 2 ]
[ "ImportFrom'", "Import'", "Import'", "Import'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Condition", "Assign'", "AugAssign'", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_34(VAR_11):...\n", "VAR_22 = {'camera': camera_images_db, 'main': main_images_db}\n", "if not VAR_11 in VAR_22:\n", "return VAR_22[VAR_11]\n" ]
[ "def get_image_database(type):...\n", "image_databases = {'camera': camera_images_db, 'main': main_images_db}\n", "if not type in image_databases:\n", "return image_databases[type]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return kato.new_agent(VAR_14)\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return kato.new_agent(bindings)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_20(self):...\n", "self._ServerCleanup()\n" ]
[ "def OnVimLeave(self):...\n", "self._ServerCleanup()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_3(VAR_9='', VAR_10='GET', VAR_7='', VAR_4={}):...\n", "VAR_19 = CLASS_2(VAR_9.split('/'))\n", "for VAR_20, val in VAR_4.iteritems():\n", "VAR_19.headers[VAR_20.lower()] = val\n", "VAR_19.method = VAR_10\n", "if isinstance(VAR_7, str):\n", "VAR_19.content = io.BytesIO(VAR_7)\n", "for VAR_12, ...
[ "def request_mock(path='', method='GET', body='', headers={}):...\n", "dummy = PixRequestMock(path.split('/'))\n", "for name, val in headers.iteritems():\n", "dummy.headers[name.lower()] = val\n", "dummy.method = method\n", "if isinstance(body, str):\n", "dummy.content = io.BytesIO(body)\n", "for key,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "For", "Return'", "Expr'" ]
[ "def FUNC_4(self):...\n", "while self.completed_path < self.MAX_CRAWLS:\n", "if self.crawler():\n", "self.completed_path += 1\n", "self.invalid_path += 1\n", "print()\n" ]
[ "def crawl(self):...\n", "while self.completed_path < self.MAX_CRAWLS:\n", "if self.crawler():\n", "self.completed_path += 1\n", "self.invalid_path += 1\n", "print()\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "AugAssign'", "AugAssign'", "Expr'" ]
[ "@VAR_0.route('/js/<path:filename>')...\n", "return send_from_directory('js', VAR_5)\n" ]
[ "@app.route('/js/<path:filename>')...\n", "return send_from_directory('js', filename)\n" ]
[ 0, 4 ]
[ "Condition", "Return'" ]
[ "def FUNC_19(VAR_32, VAR_33, VAR_5=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_52 = {}\n", "VAR_61 = {}\n", "def FUNC_31(VAR_62):...\n", "\"\"\"docstring\"\"\"\n", "VAR_84 = 0\n", "while VAR_62[VAR_84].isdigit():\n", "VAR_84 += 1\n", "if VAR_84 > 0:\n", "return int(VAR_62[:VAR_84])\n", "ret...
[ "def _get_core_keywords(skw_matches, ckw_matches, spires=False):...\n", "\"\"\"docstring\"\"\"\n", "output = {}\n", "category = {}\n", "def _get_value_kw(kw):...\n", "\"\"\"docstring\"\"\"\n", "i = 0\n", "while kw[i].isdigit():\n", "i += 1\n", "if i > 0:\n", "return int(kw[:i])\n", "return 0\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Condition", "AugAssign'", "Condition", "Return'", "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_44(self):...\n", "return self._names\n" ]
[ "def keys(self):...\n", "return self._names\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(self):...\n", "VAR_2 = self.prepare_args()\n", "VAR_2.limit = self.add_limit()\n", "if VAR_2.conditions:\n", "VAR_2.conditions = 'where ' + VAR_2.conditions\n", "if self.distinct:\n", "VAR_2.fields = 'distinct ' + VAR_2.fields\n", "VAR_7 = (\n \"\"\"select %(fields)s from %(tables)s %(c...
[ "def build_and_run(self):...\n", "args = self.prepare_args()\n", "args.limit = self.add_limit()\n", "if args.conditions:\n", "args.conditions = 'where ' + args.conditions\n", "if self.distinct:\n", "args.fields = 'distinct ' + args.fields\n", "query = (\n \"\"\"select %(fields)s from %(tables)s %(c...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_23(VAR_38, VAR_39):...\n", "\"\"\"docstring\"\"\"\n", "VAR_65 = cmp(len(VAR_39[1][0]), len(VAR_38[1][0]))\n", "if VAR_65:\n", "return VAR_65\n", "if VAR_38[0].isComposite() and VAR_39[0].isComposite():\n", "VAR_85 = sum(VAR_38[1][1]) / len(VAR_38[1][1])\n", "return cmp(len(str(VAR_39[0])), l...
[ "def _skw_matches_comparator(kw0, kw1):...\n", "\"\"\"docstring\"\"\"\n", "list_comparison = cmp(len(kw1[1][0]), len(kw0[1][0]))\n", "if list_comparison:\n", "return list_comparison\n", "if kw0[0].isComposite() and kw1[0].isComposite():\n", "component_avg0 = sum(kw0[1][1]) / len(kw0[1][1])\n", "return...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_18(self):...\n", "if not self._IsServerAlive():\n", "return\n", "SendEventNotificationAsync('InsertLeave')\n" ]
[ "def OnInsertLeave(self):...\n", "if not self._IsServerAlive():\n", "return\n", "SendEventNotificationAsync('InsertLeave')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'" ]
[ "def FUNC_12(self):...\n", "VAR_4 = {url_helper.swarm_constants.COUNT_KEY: 1}\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen('url', VAR_4=data), None)\n", "self._mox.VerifyAll()\n" ]
[ "def testCountKeyInData(self):...\n", "data = {url_helper.swarm_constants.COUNT_KEY: 1}\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen('url', data=data), None)\n", "self._mox.VerifyAll()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2(VAR_3, VAR_4, VAR_5):...\n", "" ]
[ "def check(id, attribute, clss):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_1(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if not FUNC_0():\n", "return VAR_1\n", "VAR_6 = os.path.normpath(VAR_1).split(os.path.sep)\n", "for VAR_14 in xrange(2, len(VAR_6)):\n", "VAR_13 = os.path.sep.join(VAR_6[:VAR_14])\n", "return os.path.normpath(os.path.sep.join(VAR_6))\n", "if os....
[ "def resolve_symlink(path):...\n", "\"\"\"docstring\"\"\"\n", "if not is_windows():\n", "return path\n", "parts = os.path.normpath(path).split(os.path.sep)\n", "for i in xrange(2, len(parts)):\n", "partial = os.path.sep.join(parts[:i])\n", "return os.path.normpath(os.path.sep.join(parts))\n", "if os...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_18(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.upload:\n", "return self.upload\n", "VAR_26 = self.request.get('upload_key')\n", "if not VAR_26:\n", "return None\n", "VAR_27 = storage.GcsBlobInfo.from_key(VAR_26)\n", "if not VAR_27:\n", "self.upload = VAR_27\n", "return self.uploa...
[ "def get_upload(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.upload:\n", "return self.upload\n", "upload_key = self.request.get('upload_key')\n", "if not upload_key:\n", "return None\n", "blob_info = storage.GcsBlobInfo.from_key(upload_key)\n", "if not blob_info:\n", "self.upload = blob_info\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_23):...\n", "if VAR_23:\n", "VAR_94 = _force_ascii(VAR_23)\n", "if VAR_94 == VAR_23:\n", "abort(404, 'page not found')\n", "return Tag._by_name(VAR_94)\n" ]
[ "def run(self, name):...\n", "if name:\n", "cleaned = _force_ascii(name)\n", "if cleaned == name:\n", "abort(404, 'page not found')\n", "return Tag._by_name(cleaned)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_9(VAR_8, VAR_11, VAR_12=False, VAR_13=False, VAR_14=None, VAR_15=False...\n", "def FUNC_35(VAR_29):...\n", "VAR_40 = VAR_29.group('name')\n", "VAR_16 = VAR_11[VAR_40]\n", "if VAR_15:\n", "return re.sub(VAR_5, FUNC_35, VAR_8)\n", "if VAR_13 and VAR_16 == VAR_14:\n", "return '{{{}}}'.format(VA...
[ "def apply_wildcards(pattern, wildcards, fill_missing=False, fail_dynamic=...\n", "def format_match(match):...\n", "name = match.group('name')\n", "value = wildcards[name]\n", "if keep_dynamic:\n", "return re.sub(_wildcard_regex, format_match, pattern)\n", "if fail_dynamic and value == dynamic_fill:\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_28(self, VAR_23):...\n", "\"\"\"docstring\"\"\"\n", "VAR_42 = VAR_23.split('.')[0]\n", "if not self._plugin_exists(VAR_42):\n", "return False\n", "if self._check_disabled(VAR_42) and VAR_42 not in self.config['enable_plugins'\n", "return False\n", "if self._check_enabled(VAR_42):\n", "retu...
[ "def _plugin_option_exists(self, opt):...\n", "\"\"\"docstring\"\"\"\n", "plug = opt.split('.')[0]\n", "if not self._plugin_exists(plug):\n", "return False\n", "if self._check_disabled(plug) and plug not in self.config['enable_plugins']:\n", "return False\n", "if self._check_enabled(plug):\n", "retu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_14(self):...\n", "VAR_5 = None\n", "VAR_5 = tempfile.NamedTemporaryFile(delete=False)\n", "if VAR_5:\n", "VAR_5.close()\n", "os.remove(VAR_5.name)\n", "self._mox.StubOutWithMock(url_helper, 'UrlOpen')\n", "VAR_12 = 'data'\n", "url_helper.UrlOpen(mox.IgnoreArg(), method='GET').AndReturn(VAR...
[ "def testDownloadFile(self):...\n", "local_file = None\n", "local_file = tempfile.NamedTemporaryFile(delete=False)\n", "if local_file:\n", "local_file.close()\n", "os.remove(local_file.name)\n", "self._mox.StubOutWithMock(url_helper, 'UrlOpen')\n", "file_data = 'data'\n", "url_helper.UrlOpen(mox.Ign...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_10(self, *VAR_11, **VAR_12):...\n", "for VAR_9 in VAR_11:\n", "self._set_params_item(VAR_9)\n", "for VAR_10, VAR_9 in VAR_12.items():\n", "self._set_params_item(VAR_9, VAR_10=name)\n" ]
[ "def set_params(self, *params, **kwparams):...\n", "for item in params:\n", "self._set_params_item(item)\n", "for name, item in kwparams.items():\n", "self._set_params_item(item, name=name)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "For", "Expr'" ]
[ "def FUNC_1(self):...\n", "return 'load statement for task %s (%s)' % (self.task_id, self.url)\n" ]
[ "def describe(self):...\n", "return 'load statement for task %s (%s)' % (self.task_id, self.url)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_22(VAR_14, VAR_15):...\n", "VAR_37 = VAR_14.state['sleep_streak']\n", "self.assertEqual(VAR_14.remote, self.server)\n", "if VAR_37 == 5:\n", "return False\n" ]
[ "def poll_server(botobj, _):...\n", "sleep_streak = botobj.state['sleep_streak']\n", "self.assertEqual(botobj.remote, self.server)\n", "if sleep_streak == 5:\n", "return False\n" ]
[ 0, 0, 5, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Condition", "Return'" ]
[ "def FUNC_3(VAR_10=None, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = VAR_10 or []\n", "VAR_4 = VAR_4 or []\n", "VAR_13 = hashlib.md5(str(time.time())).hexdigest()\n", "VAR_14 = []\n", "for VAR_18, VAR_9 in VAR_10:\n", "VAR_18 = FUNC_2(VAR_18)\n", "for VAR_18, VAR_19, VAR_9 in VAR_4:\n",...
[ "def EncodeMultipartFormData(fields=None, files=None):...\n", "\"\"\"docstring\"\"\"\n", "fields = fields or []\n", "files = files or []\n", "boundary = hashlib.md5(str(time.time())).hexdigest()\n", "body_list = []\n", "for key, value in fields:\n", "key = _ConvertToAscii(key)\n", "for key, filename...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "AugAssign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'", "Expr'", "Expr'", "Expr'", "...
[ "def __init__(self, VAR_1, VAR_7, VAR_8, VAR_9, VAR_10=None, VAR_4=None):...\n", "GenericRequest.__init__(self, VAR_1, VAR_4)\n", "self.url = '%stasks/%s/test' % (self.base_url, VAR_7[1])\n", "self.task = VAR_7\n", "self.submission_format = VAR_8\n", "self.filenames = VAR_9\n", "self.data = {}\n", "if...
[ "def __init__(self, browser, task, submission_format, filenames, language=...\n", "GenericRequest.__init__(self, browser, base_url)\n", "self.url = '%stasks/%s/test' % (self.base_url, task[1])\n", "self.task = task\n", "self.submission_format = submission_format\n", "self.filenames = filenames\n", "self...
[ 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "For", "Condition", "Assign'", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_4(self, VAR_10, VAR_11):...\n", "VAR_26 = []\n", "for VAR_1 in VAR_10:\n", "VAR_35 = '-'\n", "return VAR_26\n", "VAR_28 = VAR_11(VAR_1)\n", "if not VAR_28:\n", "VAR_28 = VAR_28[0]\n", "if VAR_28.access_requested:\n", "VAR_35 = VAR_28.access_requested.strftime('%Y-%m-%d')\n", "VAR_16 = ...
[ "def _build_json_response(self, query, access_for):...\n", "json_response = []\n", "for user in query:\n", "applyDate = '-'\n", "return json_response\n", "access = access_for(user)\n", "if not access:\n", "access = access[0]\n", "if access.access_requested:\n", "applyDate = access.access_requested...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_6(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n", "self.write_data({'type': 'tribler_started'})\n" ]
[ "def on_tribler_started(self, subject, changetype, objectID, *args):...\n", "self.write_data({'type': 'tribler_started'})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_11(VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = VAR_3.user\n", "VAR_33 = [(unicode(year), unicode(year)) for year in UserProfile.VALID_YEARS]\n", "VAR_26 = FUNC_8(VAR_10)\n", "VAR_1.exception('Error fetching order history from Otto.')\n", "VAR_5 = {'auth': {}, 'duplicate_provider': None...
[ "def account_settings_context(request):...\n", "\"\"\"docstring\"\"\"\n", "user = request.user\n", "year_of_birth_options = [(unicode(year), unicode(year)) for year in\n UserProfile.VALID_YEARS]\n", "user_orders = get_user_orders(user)\n", "log.exception('Error fetching order history from Otto.')\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'" ]
[ "def FUNC_14(self, VAR_11, VAR_12):...\n", "self.common._cli_run('createhost -iscsi -add %s %s' % (VAR_11, VAR_12), None)\n" ]
[ "def _modify_3par_iscsi_host(self, hostname, iscsi_iqn):...\n", "self.common._cli_run('createhost -iscsi -add %s %s' % (hostname, iscsi_iqn),\n None)\n" ]
[ 0, 2 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_6(VAR_6, VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "VAR_17 = VAR_6.id\n", "VAR_18 = VAR_6.tasks\n", "VAR_19 = set([VAR_23.id for VAR_23 in VAR_18])\n", "for task_id, VAR_23 in VAR_9.items():\n", "if task_id in VAR_19:\n", "if len(VAR_19) > 0:\n", "print(VAR_19)\n", "VAR_23['user_id'] = V...
[ "def update_user_tasks(verified_user, all_tasks):...\n", "\"\"\"docstring\"\"\"\n", "user_id = verified_user.id\n", "db_user_tasks = verified_user.tasks\n", "db_user_task_ids = set([task.id for task in db_user_tasks])\n", "for task_id, task in all_tasks.items():\n", "if task_id in db_user_task_ids:\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "For", "Condition", "Condition", "Expr'", "Assign'", "For", "Return'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@staticmethod...\n", "def FUNC_13(self, *VAR_16, **VAR_10):...\n", "if not self.current_user or not self.current_user.admin:\n", "return VAR_7(self, *VAR_16, **kwargs)\n" ]
[ "@staticmethod...\n", "def wrapper(self, *args, **kwargs):...\n", "if not self.current_user or not self.current_user.admin:\n", "return method(self, *args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "Condition", "Return'" ]
[ "@property...\n", "return self.type == 'CP'\n" ]
[ "@property...\n", "return self.type == 'CP'\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "from __future__ import absolute_import, division, print_function, with_statement\n", "import os\n", "import sys\n", "import argparse\n", "if __name__ == '__main__':\n", "VAR_0 = argparse.ArgumentParser(description='See README')\n", "VAR_0.add_argument('-c', '--count', default=3, type=int, help=\n 'w...
[ "from __future__ import absolute_import, division, print_function, with_statement\n", "import os\n", "import sys\n", "import argparse\n", "if __name__ == '__main__':\n", "parser = argparse.ArgumentParser(description='See README')\n", "parser.add_argument('-c', '--count', default=3, type=int, help=\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 2, 2, 0, 2 ]
[ "ImportFrom'", "Import'", "Import'", "Import'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Condition", "Assign'", "AugAssign'", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "from itertools import chain\n", "import email\n", "import imaplib\n", "import json\n", "import pandas as pd\n", "import numpy as np\n", "import re\n", "from urllib.parse import unquote\n", "from db_tools import create_connection\n", "from matcher import match\n", "import traceback\n", "import...
[ "from itertools import chain\n", "import email\n", "import imaplib\n", "import json\n", "import pandas as pd\n", "import numpy as np\n", "import re\n", "from urllib.parse import unquote\n", "from db_tools import create_connection\n", "from matcher import match\n", "import traceback\n", "import...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Ex...
[ "def FUNC_1(self):...\n", "VAR_13 = EntityCacheMap()\n", "VAR_4 = CLASS_2(id=0)\n", "VAR_13.add(CLASS_2, VAR_4)\n", "self.assert_equal(VAR_13[CLASS_2].get_by_id(0), VAR_4)\n", "self.assert_true(VAR_4 in VAR_13)\n", "self.assert_equal(VAR_13.keys(), [CLASS_2])\n", "VAR_13.remove(CLASS_2, VAR_4)\n", "...
[ "def test_basics(self):...\n", "ecm = EntityCacheMap()\n", "ent = MyEntity(id=0)\n", "ecm.add(MyEntity, ent)\n", "self.assert_equal(ecm[MyEntity].get_by_id(0), ent)\n", "self.assert_true(ent in ecm)\n", "self.assert_equal(ecm.keys(), [MyEntity])\n", "ecm.remove(MyEntity, ent)\n", "self.assert_false(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "Condition", "Docstring" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_volume(VAR_6)\n", "self.common.client_logout()\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_volume(volume)\n", "self.common.client_logout()\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "self.position += 1\n", "if self.position < len(self.string):\n", "self.char = self.string[self.position]\n", "self.char = None\n", "return self.char\n" ]
[ "def read(self):...\n", "\"\"\"docstring\"\"\"\n", "self.position += 1\n", "if self.position < len(self.string):\n", "self.char = self.string[self.position]\n", "self.char = None\n", "return self.char\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "AugAssign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def __iter__(self) ->Iterator[CLASS_2]:...\n", "...\n" ]
[ "def __iter__(self) ->Iterator[IRow]:...\n", "...\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_11(self, VAR_1, VAR_3, VAR_4=6, VAR_5=10):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = \"/usr/bin/tmsh modify auth user {0} password '{1}'\".format(VAR_1,\n VAR_3)\n", "VAR_17, VAR_20 = shellutil.run_get_output(VAR_15, log_cmd=False, VAR_8=True)\n", "if VAR_17 != 0:\n", "VAR_21 = self.get_use...
[ "def chpasswd(self, username, password, crypt_id=6, salt_len=10):...\n", "\"\"\"docstring\"\"\"\n", "cmd = \"/usr/bin/tmsh modify auth user {0} password '{1}'\".format(username,\n password)\n", "ret, output = shellutil.run_get_output(cmd, log_cmd=False, chk_err=True)\n", "if ret != 0:\n", "userentry = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "from google.appengine.ext import ndb\n", "from gae_libs.handlers.base_handler import BaseHandler\n", "from gae_libs.handlers.base_handler import Permission\n", "def FUNC_0(VAR_0, VAR_1):...\n", "if VAR_0 is None and VAR_1 is None:\n", "return None, None\n", "VAR_0 = VAR_0 if VAR_0 is not None else VAR_...
[ "from google.appengine.ext import ndb\n", "from gae_libs.handlers.base_handler import BaseHandler\n", "from gae_libs.handlers.base_handler import Permission\n", "def _GetLowerAndUpperBoundCommitPositions(lower_bound, upper_bound):...\n", "if lower_bound is None and upper_bound is None:\n", "return None, N...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_6):...\n", "self.meta = VAR_6\n", "self.parents = []\n", "self.fields = []\n", "self.virtual_fields = []\n", "self.name = None\n", "self.class_name = None\n", "self.name_space = NOT_PROVIDED\n", "self.verbose_name = None\n", "self.verbose_name_plural = None\n", "self.abst...
[ "def __init__(self, meta):...\n", "self.meta = meta\n", "self.parents = []\n", "self.fields = []\n", "self.virtual_fields = []\n", "self.name = None\n", "self.class_name = None\n", "self.name_space = NOT_PROVIDED\n", "self.verbose_name = None\n", "self.verbose_name_plural = None\n", "self.abstra...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_0():...\n", "VAR_3 = datetime.now()\n", "VAR_4 = getRedditInstance()\n", "VAR_5 = VAR_4.subreddit('geoguessr')\n", "VAR_0 = VAR_5.new(limit=10)\n", "addToDatabase(VAR_0)\n", "FUNC_1(VAR_0)\n", "print(datetime.now() - VAR_3)\n" ]
[ "def checkNewSubmissions():...\n", "startTime = datetime.now()\n", "reddit = getRedditInstance()\n", "subreddit = reddit.subreddit('geoguessr')\n", "submissionList = subreddit.new(limit=10)\n", "addToDatabase(submissionList)\n", "checkForSeriesSubmissions(submissionList)\n", "print(datetime.now() - st...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_9(self, VAR_10):...\n", "VAR_22 = _('local_path not supported')\n" ]
[ "def local_path(self, volume):...\n", "msg = _('local_path not supported')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_6(VAR_0, VAR_3, VAR_4, VAR_5, VAR_1):...\n", "VAR_1.execute('string'.format(VAR_0=playlist_id, VAR_3=title, VAR_4=\n thumbnail, VAR_5=position))\n" ]
[ "def create_video(playlist_id, title, thumbnail, position, db):...\n", "db.execute(\n \"INSERT INTO video (playlist_id, title, thumbnail, position) VALUES({playlist_id}, '{title}', '{thumbnail}', {position});\"\n .format(playlist_id=playlist_id, title=title, thumbnail=thumbnail,\n position=position))\n" ...
[ 0, 4 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self, *VAR_4, **VAR_5):...\n", "super(CLASS_0, self).__init__(*VAR_4, **kwargs)\n", "self.configuration.append_config_values(VAR_1)\n", "self._group_ip = None\n", "self.sshpool = None\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(DellEQLSanISCSIDriver, self).__init__(*args, **kwargs)\n", "self.configuration.append_config_values(eqlx_opts)\n", "self._group_ip = None\n", "self.sshpool = None\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_5(self, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "if not os.path.exists(VAR_4):\n", "VAR_19 = os.path.dirname(VAR_4)\n", "if not os.path.isdir(VAR_19):\n", "try_to_create_directory(VAR_19)\n" ]
[ "def prepare_socket_file(self, socket_path):...\n", "\"\"\"docstring\"\"\"\n", "if not os.path.exists(socket_path):\n", "path = os.path.dirname(socket_path)\n", "if not os.path.isdir(path):\n", "try_to_create_directory(path)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_4(VAR_7, VAR_8=7):...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = datetime.now()\n", "VAR_21 = VAR_7.get('startDate') or VAR_7.get('startdate')\n", "VAR_22 = VAR_7.get('endDate') or VAR_7.get('enddate')\n", "VAR_23 = FUNC_5(VAR_22) or VAR_20\n", "VAR_24 = FUNC_5(VAR_21) or VAR_23 - timedelta(days...
[ "def clean_date_params(query_dict, delta=7):...\n", "\"\"\"docstring\"\"\"\n", "now = datetime.now()\n", "start_date_param = query_dict.get('startDate') or query_dict.get('startdate')\n", "end_date_param = query_dict.get('endDate') or query_dict.get('enddate')\n", "end_date = parse_date(end_date_param) or...
[ 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'" ]
[ "def __init__(self, VAR_10):...\n", "super(CLASS_1, self).__init__()\n", "self.user_id = VAR_0.select('user', 'telegram_id = ' + str(VAR_10))[0]['id']\n", "self.path = [VAR_0.select('directory', \n \"name = '/' AND parent_directory_id = 'NULL' AND user_id = \" + str(self\n .user_id))[0]['id']]\n", "se...
[ "def __init__(self, telegram_id):...\n", "super(Explorer, self).__init__()\n", "self.user_id = db.select('user', 'telegram_id = ' + str(telegram_id))[0]['id']\n", "self.path = [db.select('directory', \n \"name = '/' AND parent_directory_id = 'NULL' AND user_id = \" + str(self\n .user_id))[0]['id']]\n", ...
[ 0, 0, 4, 4, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(VAR_3: Roamer, VAR_2: bool=None) ->object:...\n", "\"\"\"docstring\"\"\"\n", "VAR_23 = VAR_3._r_item_\n", "if VAR_2 and VAR_23 is VAR_0:\n", "return VAR_23\n" ]
[ "def unwrap(roamer: Roamer, _raise: bool=None) ->object:...\n", "\"\"\"docstring\"\"\"\n", "result = roamer._r_item_\n", "if _raise and result is MISSING:\n", "return result\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "import odin\n", "from odin.fields.virtual import CalculatedField\n", "from odin.mapping.helpers import sum_fields\n", "VAR_0 = odin.StringField()\n", "VAR_48 = None\n", "VAR_0 = odin.StringField()\n", "VAR_48 = None\n", "VAR_49 = True\n", "VAR_48 = 'library'\n", "VAR_50 = 'isbn'\n", "VAR_1 = od...
[ "import odin\n", "from odin.fields.virtual import CalculatedField\n", "from odin.mapping.helpers import sum_fields\n", "name = odin.StringField()\n", "name_space = None\n", "name = odin.StringField()\n", "name_space = None\n", "abstract = True\n", "name_space = 'library'\n", "key_field = 'isbn'\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_10(self):...\n", "return self.unofficial\n" ]
[ "def is_unofficial(self):...\n", "return self.unofficial\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_13(self, *VAR_13, **VAR_14):...\n", "for VAR_9 in VAR_13:\n", "self._set_log_item(VAR_9)\n", "for VAR_10, VAR_9 in VAR_14.items():\n", "self._set_log_item(VAR_9, VAR_10=name)\n" ]
[ "def set_log(self, *logs, **kwlogs):...\n", "for item in logs:\n", "self._set_log_item(item)\n", "for name, item in kwlogs.items():\n", "self._set_log_item(item, name=name)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "For", "Expr'" ]
[ "def __init__(self, *VAR_10, **VAR_11):...\n", "\"\"\"docstring\"\"\"\n", "VAR_21 = self.cartpos = VAR_11.pop('cartpos', None)\n", "VAR_22 = self.orderpos = VAR_11.pop('orderpos', None)\n", "VAR_23 = VAR_21 or VAR_22\n", "VAR_24 = VAR_23.item\n", "VAR_25 = VAR_23.item.questions_to_ask\n", "VAR_26 = VA...
[ "def __init__(self, *args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "cartpos = self.cartpos = kwargs.pop('cartpos', None)\n", "orderpos = self.orderpos = kwargs.pop('orderpos', None)\n", "pos = cartpos or orderpos\n", "item = pos.item\n", "questions = pos.item.questions_to_ask\n", "event = kwargs....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "Assi...
[ "def FUNC_8(VAR_11):...\n", "return True\n" ]
[ "def file_filter(_path):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "return base64.b64encode(json.dumps(VAR_4, cls=JsonEncoder))\n" ]
[ "def encode_json(value):...\n", "\"\"\"docstring\"\"\"\n", "return base64.b64encode(json.dumps(value, cls=JsonEncoder))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "self.sql_session = SQL_Session()\n" ]
[ "def prepare(self):...\n", "\"\"\"docstring\"\"\"\n", "self.sql_session = SQL_Session()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "def FUNC_10(self):...\n", "self.cursor.execute('DELETE FROM log_simics_memory_diff WHERE result_id=?',\n [self.result['id']])\n", "self.cursor.execute('DELETE FROM log_simics_register_diff WHERE result_id=?',\n [self.result['id']])\n", "self.cursor.execute('DELETE FROM log_injection WHERE result_id=?',...
[ "def delete_result(self):...\n", "self.cursor.execute('DELETE FROM log_simics_memory_diff WHERE result_id=?',\n [self.result['id']])\n", "self.cursor.execute('DELETE FROM log_simics_register_diff WHERE result_id=?',\n [self.result['id']])\n", "self.cursor.execute('DELETE FROM log_injection WHERE result_...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_15(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n", "self.write_data({'type': 'market_ask_timeout', 'event': VAR_5[0]})\n" ]
[ "def on_market_ask_timeout(self, subject, changetype, objectID, *args):...\n", "self.write_data({'type': 'market_ask_timeout', 'event': args[0]})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(VAR_7):...\n", "VAR_20 = {}\n", "for m in re.finditer('(SACSID)\\\\s+(~[0-9a-zA-Z_-]+)\\\\s+([a-z.-]+)(?:\\\\s|$)',\n", "VAR_25, VAR_24, VAR_26 = m.groups()\n", "VAR_21 = '(?:TRUE|FALSE)\\\\s+/\\\\s+(?:TRUE|FALSE)\\\\s+\\\\d+\\\\s+'\n", "VAR_20[VAR_26] = VAR_25, VAR_24\n", "VAR_22 = '([a-z.-...
[ "def parse_cookies(text):...\n", "cookies = {}\n", "for m in re.finditer('(SACSID)\\\\s+(~[0-9a-zA-Z_-]+)\\\\s+([a-z.-]+)(?:\\\\s|$)',\n", "key, value, domain = m.groups()\n", "garbage = '(?:TRUE|FALSE)\\\\s+/\\\\s+(?:TRUE|FALSE)\\\\s+\\\\d+\\\\s+'\n", "cookies[domain] = key, value\n", "cj_pattern = ('(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "Expr'", "Return'" ]
[ "@auth.public...\n", "VAR_4 = {'is_admin': auth.is_admin()}\n", "self.response.write(template.render('templates/root.html', VAR_4=params))\n" ]
[ "@auth.public...\n", "params = {'is_admin': auth.is_admin()}\n", "self.response.write(template.render('templates/root.html', params=params))\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Expr'" ]
[ "VAR_0 = 'string'\n", "import sys, os, re\n", "import unittest\n", "from decimal import Decimal\n", "from datetime import datetime, date, time\n", "from os.path import join, getsize, dirname, abspath\n", "from testutils import *\n", "VAR_1 = '0123456789-abcdefghijklmnopqrstuvwxyz-'\n", "def FUNC_0(V...
[ "usage = \"\"\"usage: %prog [options] connection_string\n\nUnit tests for SQLite using the ODBC driver from http://www.ch-werner.de/sqliteodbc\n\nTo use, pass a connection string as the parameter. The tests will create and\ndrop tables t1 and t2 as necessary. On Windows, use the 32-bit driver with\n32-bit Python a...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Assign'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_5(self, VAR_8):...\n", "VAR_16 = \"SELECT Votes FROM report WHERE Report_ID = '\" + VAR_8 + \"'\"\n", "self.cursor.execute(VAR_16)\n", "VAR_15 = self.cursor.fetchone()\n", "VAR_17 = ' '.join(map(str, VAR_15))\n", "VAR_18 = int(VAR_17)\n", "return VAR_18\n" ]
[ "def get_vote(self, reportID):...\n", "query1 = \"SELECT Votes FROM report WHERE Report_ID = '\" + reportID + \"'\"\n", "self.cursor.execute(query1)\n", "fetch = self.cursor.fetchone()\n", "curVote = ' '.join(map(str, fetch))\n", "intVote = int(curVote)\n", "return intVote\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@functools.wraps(VAR_3)...\n", "VAR_23 = VAR_5.pop('timeout', None)\n", "VAR_24 = eventlet.spawn(VAR_3, self, *VAR_4, **kwargs)\n", "if VAR_23 is None:\n", "return VAR_24.wait()\n", "VAR_36 = eventlet.spawn_after(VAR_23, VAR_24.kill)\n", "VAR_48 = VAR_24.wait()\n", "VAR_36.cancel()\n", "return VAR_...
[ "@functools.wraps(f)...\n", "timeout = kwargs.pop('timeout', None)\n", "gt = eventlet.spawn(f, self, *args, **kwargs)\n", "if timeout is None:\n", "return gt.wait()\n", "kill_thread = eventlet.spawn_after(timeout, gt.kill)\n", "res = gt.wait()\n", "kill_thread.cancel()\n", "return res\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_9(self, VAR_11, VAR_3):...\n", "VAR_16 = VAR_11['localattributes'].keys() if 'localattributes' in VAR_11 else [\n ]\n", "VAR_16.extend(VAR_11['treeattributes'].keys() if 'treeattributes' in VAR_11\n else [])\n", "return set(VAR_16)\n" ]
[ "def get_attributes(self, levelfields, doc):...\n", "keys = levelfields['localattributes'].keys(\n ) if 'localattributes' in levelfields else []\n", "keys.extend(levelfields['treeattributes'].keys() if 'treeattributes' in\n levelfields else [])\n", "return set(keys)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_11(VAR_18):...\n", "if not VAR_4:\n", "print('Restarting worker due to change in %s' % VAR_18.src_path)\n", "log.info('modified %s' % VAR_18.src_path)\n", "FUNC_13()\n", "log.exception('Error while restarting worker')\n", "FUNC_12()\n" ]
[ "def on_modified(event):...\n", "if not is_background:\n", "print('Restarting worker due to change in %s' % event.src_path)\n", "log.info('modified %s' % event.src_path)\n", "kill_children()\n", "log.exception('Error while restarting worker')\n", "run_children()\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]