lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_28(VAR_24):...\n", "VAR_33.append(VAR_24)\n", "return 23\n" ]
[ "def exec_python(args):...\n", "calls.append(args)\n", "return 23\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Return'" ]
[ "def FUNC_20(self, VAR_19, VAR_20):...\n", "\"\"\"docstring\"\"\"\n", "for clause in reversed(self.order):\n", "VAR_40 = VAR_20.has_wildcards() - VAR_19.has_wildcards()\n", "VAR_51 = clause.index(VAR_19.name)\n", "if VAR_40 != 0:\n", "VAR_52 = clause.index(VAR_20.name)\n", "return VAR_40\n", "return...
[ "def compare(self, rule1, rule2):...\n", "\"\"\"docstring\"\"\"\n", "for clause in reversed(self.order):\n", "wildcard_cmp = rule2.has_wildcards() - rule1.has_wildcards()\n", "i = clause.index(rule1.name)\n", "if wildcard_cmp != 0:\n", "j = clause.index(rule2.name)\n", "return wildcard_cmp\n", "retu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Return'", "Assign'" ]
[ "\"\"\"string\"\"\"\n", "from __future__ import unicode_literals\n", "from django.conf import settings\n", "from django.conf.urls import include\n", "from django.conf.urls import patterns\n", "from django.conf.urls import url\n", "from api import routers\n", "from api import views\n", "VAR_0 = route...
[ "\"\"\"\nRESTful URL patterns and routing for the Deis API app.\n\n\nApplications\n============\n\n.. http:get:: /api/apps/(string:id)/\n\n Retrieve a :class:`~api.models.App` by its `id`.\n\n.. http:delete:: /api/apps/(string:id)/\n\n Destroy a :class:`~api.models.App` by its `id`.\n\n.. http:get:: /api/apps/\n\...
[ 5, 0, 0, 0, 0, 0, 0, 0, 0, 5 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'" ]
[ "def __init__(self):...\n", "self.content = None\n", "self.filled = False\n" ]
[ "def __init__(self):...\n", "self.content = None\n", "self.filled = False\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_0(VAR_1):...\n", "if not 'now' in VAR_1:\n", "VAR_1['now'] = timezone.now()\n", "return VAR_1['now']\n" ]
[ "def _prepare_now(context):...\n", "if not 'now' in context:\n", "context['now'] = timezone.now()\n", "return context['now']\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_7():...\n", "parse_command_line()\n", "VAR_19 = motor.motor_tornado.MotorClient().news\n", "VAR_4 = VAR_19.articles\n", "VAR_20 = tornado.web.Application([('/', CLASS_1), ('/post/(.+)', CLASS_2),\n ('/new', CLASS_3)], cookie_secret='__THERE_IS_NO_SECRET_COOKIE__',\n template_path=os.path.joi...
[ "def main():...\n", "parse_command_line()\n", "db = motor.motor_tornado.MotorClient().news\n", "collection = db.articles\n", "app = tornado.web.Application([('/', MainHandler), ('/post/(.+)',\n PostHandler), ('/new', PostNewHandler)], cookie_secret=\n '__THERE_IS_NO_SECRET_COOKIE__', template_path=os....
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self):...\n", "VAR_5 = [{'cloudProvider': 'gce', 'asgName': self.__server_group_name,\n 'serverGroupName': self.__server_group_name, 'region': self.TEST_REGION,\n 'zone': self.TEST_ZONE, 'type': 'disableServerGroup', 'regions': [self.\n TEST_REGION], 'zones': [self.TEST_ZONE], 'credentials': ...
[ "def disable_server_group(self):...\n", "job = [{'cloudProvider': 'gce', 'asgName': self.__server_group_name,\n 'serverGroupName': self.__server_group_name, 'region': self.TEST_REGION,\n 'zone': self.TEST_ZONE, 'type': 'disableServerGroup', 'regions': [self.\n TEST_REGION], 'zones': [self.TEST_ZONE], 'cr...
[ 0, 0, 0, 1, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "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_4(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = jc.Contract()\n", "return st.OperationContract(self.agent.make_delete_app_operation(VAR_1=self\n .bindings, application=self.TEST_APP), VAR_5=contract)\n" ]
[ "def delete_app(self):...\n", "\"\"\"docstring\"\"\"\n", "contract = jc.Contract()\n", "return st.OperationContract(self.agent.make_delete_app_operation(bindings=\n self.bindings, application=self.TEST_APP), contract=contract)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def __str__(self):...\n", "return self.name\n" ]
[ "def __str__(self):...\n", "return self.name\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_30(self, VAR_5):...\n", "def FUNC_32(VAR_19):...\n", "return dict((expr, vimsupport.VimExpressionToPythonType(expr)) for expr in\n VAR_19)\n" ]
[ "def _AddExtraConfDataIfNeeded(self, extra_data):...\n", "def BuildExtraConfData(extra_conf_vim_data):...\n", "return dict((expr, vimsupport.VimExpressionToPythonType(expr)) for expr in\n extra_conf_vim_data)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def FUNC_4():...\n", "return 'cap multigraph dirtyconfig' + VAR_4\n" ]
[ "def cap():...\n", "return 'cap multigraph dirtyconfig' + LINEBREAK\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "import logging, concurrent.futures\n", "from utils import *\n", "from urllib.parse import urljoin, urlparse\n", "from threading import Lock\n", "def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3, VAR_4, VAR_5=None, VAR_6=...\n", "self.logger = logging.getLogger('fuxploider')\n", "self.postData = VAR_4\n", ...
[ "import logging, concurrent.futures\n", "from utils import *\n", "from urllib.parse import urljoin, urlparse\n", "from threading import Lock\n", "def __init__(self, notRegex, trueRegex, session, size, postData,...\n", "self.logger = logging.getLogger('fuxploider')\n", "self.postData = postData\n", "se...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "As...
[ "def FUNC_39(VAR_101):...\n", "VAR_101.benchmark = VAR_74\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.benchmark = benchmark\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_1():...\n", "VAR_9 = FUNC_0()\n", "VAR_10 = VAR_9.cursor()\n", "VAR_10.execute(\"\"\"\n SELECT 1 FROM people LIMIT 1;\n \"\"\")\n", "VAR_10.execute(\"\"\"\n SELECT 1 FROM people LIMIT 1;\n \"\"\")\n", "VAR_10.fetchone()\n", "VAR_10.fetchone()\n", "...
[ "def check_tables():...\n", "db = db_connect()\n", "cursor = db.cursor()\n", "cursor.execute(\"\"\"\n SELECT 1 FROM people LIMIT 1;\n \"\"\")\n", "cursor.execute(\"\"\"\n SELECT 1 FROM people LIMIT 1;\n \"\"\")\n", "cursor.fetchone()\n", "cursor.fetchone()\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_3(self, VAR_21, VAR_23=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = self.fs\n", "for part in VAR_21.split('/'):\n", "if not len(part):\n", "return VAR_22[VAR_8]\n", "VAR_67 = False\n", "for c in VAR_22[VAR_8]:\n", "if c[VAR_1] == part:\n", "if not VAR_67:\n", "if c[VAR_2] == VAR_...
[ "def get_path(self, path, follow_symlinks=True):...\n", "\"\"\"docstring\"\"\"\n", "cwd = self.fs\n", "for part in path.split('/'):\n", "if not len(part):\n", "return cwd[A_CONTENTS]\n", "ok = False\n", "for c in cwd[A_CONTENTS]:\n", "if c[A_NAME] == part:\n", "if not ok:\n", "if c[A_TYPE] == T_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Condition", "Return'", "Assign'", "For", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Assign'" ]
[ "async def FUNC_3(VAR_6):...\n", "VAR_7 = {'username': VAR_0, 'password': 'testing123G'}\n", "VAR_8 = await VAR_6.post('/auth', VAR_7=json.dumps(data))\n", "VAR_9 = await VAR_8.json()\n", "print(VAR_9)\n", "VAR_1 = VAR_9['access_token']\n", "VAR_2 = VAR_9['refresh_token']\n", "assert VAR_1 is not None...
[ "async def test_positive_login(test_cli):...\n", "data = {'username': username, 'password': 'testing123G'}\n", "resp = await test_cli.post('/auth', data=json.dumps(data))\n", "resp_json = await resp.json()\n", "print(resp_json)\n", "access_token = resp_json['access_token']\n", "refresh_token = resp_json...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assert'", "Assert'", "Assert'" ]
[ "def FUNC_4(VAR_9):...\n", "if VAR_9['exception']['TYPE'] == UnknownExtraConf.__name__:\n" ]
[ "def _RaiseExceptionForData(data):...\n", "if data['exception']['TYPE'] == UnknownExtraConf.__name__:\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_0(self, VAR_4):...\n", "return '{:<{}} : {}'.format(self._hostname, self.config['hostlen'] + 1, VAR_4)\n" ]
[ "def _fmt_msg(self, msg):...\n", "return '{:<{}} : {}'.format(self._hostname, self.config['hostlen'] + 1, msg)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_10):...\n", "VAR_10 = VAR_10.strip()\n", "def FUNC_2():...\n", "VAR_30 = VAR_10.find(' ')\n", "VAR_24 = VAR_10[:VAR_30]\n", "VAR_42 = ''\n", "VAR_12 = VAR_10[VAR_30 + 1:]\n", "self.emph = 1 if VAR_24.find('*') > -1 else 0\n", "self.uncover = 2 if VAR_24.find('+') > -1 else 0\...
[ "def __init__(self, txt):...\n", "txt = txt.strip()\n", "def innerFunc():...\n", "i = txt.find(' ')\n", "marker = txt[:i]\n", "describee = ''\n", "content = txt[i + 1:]\n", "self.emph = 1 if marker.find('*') > -1 else 0\n", "self.uncover = 2 if marker.find('+') > -1 else 0\n", "self.kind = 0\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Co...
[ "def FUNC_13(self, VAR_9, VAR_10=None, VAR_11=None, VAR_17='', VAR_18='',...\n", "\"\"\"docstring\"\"\"\n", "VAR_28 = self.get_and_check_task(VAR_9, VAR_10, VAR_11)\n", "VAR_29 = VAR_28.get_tile_path(VAR_17, VAR_18, VAR_19)\n", "if os.path.isfile(VAR_29):\n", "VAR_32 = open(VAR_29, 'rb')\n", "return Htt...
[ "def get(self, request, pk=None, project_pk=None, z='', x='', y=''):...\n", "\"\"\"docstring\"\"\"\n", "task = self.get_and_check_task(request, pk, project_pk)\n", "tile_path = task.get_tile_path(z, x, y)\n", "if os.path.isfile(tile_path):\n", "tile = open(tile_path, 'rb')\n", "return HttpResponse(FileW...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_1():...\n", "setup(**setup_args)\n" ]
[ "def main():...\n", "setup(**setup_args)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(self):...\n", "CLASS_1.ScenarioMaker().when_call_login_email_redirect(\n ).then_response_should_be_a_redirect_to_app_deeplink_with_params()\n" ]
[ "def test_when_called_redirect_view_redirects_to_apps_url(self):...\n", "RedirectLoginEmailTestCase.ScenarioMaker().when_call_login_email_redirect(\n ).then_response_should_be_a_redirect_to_app_deeplink_with_params()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@property...\n", "VAR_65 = '.' if self._workdir is None else self._workdir\n", "if not os.path.isabs(VAR_65):\n", "return os.path.abspath(os.path.join(self.workflow.basedir, VAR_65))\n", "return VAR_65\n" ]
[ "@property...\n", "workdir = '.' if self._workdir is None else self._workdir\n", "if not os.path.isabs(workdir):\n", "return os.path.abspath(os.path.join(self.workflow.basedir, workdir))\n", "return workdir\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_33(self, VAR_24):...\n", "return self.regex().match(VAR_24) or None\n" ]
[ "def match(self, target):...\n", "return self.regex().match(target) or None\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_0.route('/login')...\n", "\"\"\"docstring\"\"\"\n", "return FUNC_3('login-action')\n" ]
[ "@authn_views.route('/login')...\n", "\"\"\"docstring\"\"\"\n", "return _authn('login-action')\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_3(VAR_9):...\n", "VAR_13, VAR_14, VAR_14, VAR_14 = VAR_3.find(VAR_9)\n", "return VAR_13['passed']\n" ]
[ "def is_passed(model):...\n", "entry, _, _, _ = cached_points.find(model)\n", "return entry['passed']\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_3(VAR_8, VAR_9, VAR_3='NGTREE', VAR_10='default', VAR_7=True,...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'CSV', 'TREE', 'JSON', 'YAML', 'NGTREE'\n", "if VAR_3 in VAR_11:\n", "VAR_0.info('Query: Finding Routed Paths (%s --> %s) for %s', VAR_8, VAR_9,\n nglib.user)\n", "return\n", "if re.sea...
[ "def get_routed_path(net1, net2, rtype='NGTREE', vrf='default', verbose=True,...\n", "\"\"\"docstring\"\"\"\n", "rtypes = 'CSV', 'TREE', 'JSON', 'YAML', 'NGTREE'\n", "if rtype in rtypes:\n", "logger.info('Query: Finding Routed Paths (%s --> %s) for %s', net1, net2,\n nglib.user)\n", "return\n", "if r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Docstring", "Assign'", "Condition", "Expr'", "Return'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "C...
[ "@gen.coroutine...\n", "yield VAR_4.insert_many(VAR_5)\n" ]
[ "@gen.coroutine...\n", "yield collection.insert_many(items)\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]
[ "def FUNC_13(self, VAR_11, VAR_12, VAR_13, VAR_14):...\n", "\"\"\"docstring\"\"\"\n", "VAR_31 = 'createhost -iscsi -persona %s -domain %s %s %s' % (VAR_14, VAR_13,\n VAR_11, VAR_12)\n", "VAR_32 = self.common._cli_run(VAR_31, None)\n", "if VAR_32 and len(VAR_32) > 1:\n", "return self.common.parse_create...
[ "def _create_3par_iscsi_host(self, hostname, iscsi_iqn, domain, persona_id):...\n", "\"\"\"docstring\"\"\"\n", "cmd = 'createhost -iscsi -persona %s -domain %s %s %s' % (persona_id,\n domain, hostname, iscsi_iqn)\n", "out = self.common._cli_run(cmd, None)\n", "if out and len(out) > 1:\n", "return self....
[ 0, 0, 2, 2, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_1 = list(self.uut.process_output(['1.0|0: Info message\\n',\n '2.2|1: Normal message\\n', \"\"\"3.4|2: Major message\n\"\"\"], 'a/file.py', [\n 'original_file_lines_placeholder']))\n", "self.assertEqual(len(VAR_1), 3)\n", "self.assertEqual(VAR_1[0].origin, 'Lint')\n", "s...
[ "def test_invalid_output(self):...\n", "out = list(self.uut.process_output(['1.0|0: Info message\\n',\n '2.2|1: Normal message\\n', \"\"\"3.4|2: Major message\n\"\"\"], 'a/file.py', [\n 'original_file_lines_placeholder']))\n", "self.assertEqual(len(out), 3)\n", "self.assertEqual(out[0].origin, 'Lint')\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_0.before_app_first_request...\n", "\"\"\"docstring\"\"\"\n", "user_logged_out.connect(oauth_logout_handler)\n", "oauth.init_app(current_app)\n", "for VAR_1, conf in cfg['OAUTHCLIENT_REMOTE_APPS'].items():\n", "if VAR_1 not in oauth.remote_apps:\n", "VAR_4 = oauth.remote_app(VAR_1, **conf['params']...
[ "@blueprint.before_app_first_request...\n", "\"\"\"docstring\"\"\"\n", "user_logged_out.connect(oauth_logout_handler)\n", "oauth.init_app(current_app)\n", "for remote_app, conf in cfg['OAUTHCLIENT_REMOTE_APPS'].items():\n", "if remote_app not in oauth.remote_apps:\n", "remote = oauth.remote_app(remote_a...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "For", "Docstring", "Expr'", "Expr'", "For", "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "@login_required...\n", "" ]
[ "@login_required...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "@VAR_0.route('/level-1')...\n", "if int(current_user.progress) >= 1:\n", "return render_template('ui.html', VAR_6='1', VAR_7='index', level_progress=\n current_user.level1_progress, max_level_progress=3)\n", "return redirect(VAR_4)\n" ]
[ "@app.route('/level-1')...\n", "if int(current_user.progress) >= 1:\n", "return render_template('ui.html', level='1', page='index', level_progress=\n current_user.level1_progress, max_level_progress=3)\n", "return redirect(url_prefix)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_5(VAR_3):...\n", "VAR_14 = None\n", "VAR_15 = {}\n", "def FUNC_16(VAR_5, VAR_6):...\n", "VAR_38 = 5\n", "VAR_39 = VAR_14 + timedelta(minutes=cache_time) < datetime.now(\n ) if VAR_14 else True\n", "if not VAR_14 or VAR_39 or VAR_5 not in VAR_15:\n", "VAR_14 = datetime.now()\n", "log.inf...
[ "def cache_number_users_with_same_feature(func):...\n", "when_was_called = None\n", "result = {}\n", "def func_launcher(feature, feature_type):...\n", "cache_time = 5\n", "high_time = when_was_called + timedelta(minutes=cache_time) < datetime.now(\n ) if when_was_called else True\n", "if not when_was...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_8(self):...\n", "clear_cache('writers')\n" ]
[ "def on_update(self):...\n", "clear_cache('writers')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_18(VAR_16):...\n", "VAR_40 = ''\n", "VAR_41 = 1\n", "for item in VAR_16:\n", "if not item[0]:\n", "return VAR_40\n", "VAR_40 += '{}. {}\\n'.format(VAR_41, item[0])\n", "VAR_41 += 1\n" ]
[ "def list_to_ordered_str_list(list_of_gadgets):...\n", "string_roaster = ''\n", "index = 1\n", "for item in list_of_gadgets:\n", "if not item[0]:\n", "return string_roaster\n", "string_roaster += '{}. {}\\n'.format(index, item[0])\n", "index += 1\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Condition", "Return'", "AugAssign'", "AugAssign'" ]
[ "def FUNC_2(VAR_4):...\n", "@VAR_4.cli.command('initdb')...\n", "\"\"\"docstring\"\"\"\n", "FUNC_3()\n", "print('Initialized the database.')\n" ]
[ "def register_cli(app):...\n", "@app.cli.command('initdb')...\n", "\"\"\"docstring\"\"\"\n", "init_db()\n", "print('Initialized the database.')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Docstring", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_0, VAR_1=1, VAR_2='-', VAR_3=False, VAR_4=...\n", "\"\"\"docstring\"\"\"\n", "assert not VAR_3 or VAR_3 and VAR_1 > 1\n", "assert VAR_4 == 'FirstOrderTransitions' or VAR_4 == 'KOrderPi', 'Error: unknown method to build null model'\n", "assert VAR_0.paths.keys() and max(VAR_0.paths.ke...
[ "def __init__(self, paths, k=1, separator='-', nullModel=False, method=...\n", "\"\"\"docstring\"\"\"\n", "assert not nullModel or nullModel and k > 1\n", "assert method == 'FirstOrderTransitions' or method == 'KOrderPi', 'Error: unknown method to build null model'\n", "assert paths.paths.keys() and max(pat...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Docstring", "Assert'", "Assert'", "Assert'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", ...
[ "def FUNC_2():...\n", "return [FUNC_1, UnionRule(TestTarget, PythonTestsAdaptor), optionable_rule(\n PyTest), optionable_rule(PythonSetup), optionable_rule(SourceRootConfig)]\n" ]
[ "def rules():...\n", "return [run_python_test, UnionRule(TestTarget, PythonTestsAdaptor),\n optionable_rule(PyTest), optionable_rule(PythonSetup), optionable_rule(\n SourceRootConfig)]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_4.user_loader...\n", "return CLASS_0(VAR_6)\n" ]
[ "@login_manager.user_loader...\n", "return User(userid)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "import sqlobject\n", "import vdm.sqlobject.base as vdmbase\n", "import vdm.base as vdmbase\n", "VAR_16 = 'name'\n", "from vdm.sqlobject.base import State\n", "from vdm.base import State\n", "VAR_0 = sqlobject.UnicodeCol(alternateID=True)\n", "VAR_1 = sqlobject.MultipleJoin('Package')\n", "VAR_2 = s...
[ "import sqlobject\n", "import vdm.sqlobject.base as vdmbase\n", "import vdm.base as vdmbase\n", "_defaultOrder = 'name'\n", "from vdm.sqlobject.base import State\n", "from vdm.base import State\n", "name = sqlobject.UnicodeCol(alternateID=True)\n", "packages = sqlobject.MultipleJoin('Package')\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4 ]
[ "Import'", "Import'", "Import'", "Assign'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Exp...
[ "def FUNC_4(VAR_9):...\n", "if VAR_9['exception']['TYPE'] == UnknownExtraConf.__name__:\n" ]
[ "def _RaiseExceptionForData(data):...\n", "if data['exception']['TYPE'] == UnknownExtraConf.__name__:\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_6(self, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "if self.lasttok == 'EXC':\n", "print(VAR_3)\n", "VAR_3.value = VAR_3.value.strip()\n", "VAR_21 = VAR_3.value.upper()\n", "if VAR_21 in self.reserved:\n", "VAR_3.type = VAR_21\n", "if self.lasttok == 'WITH':\n", "self.lasttok = VAR_3.type...
[ "def t_ID(self, tok):...\n", "\"\"\"docstring\"\"\"\n", "if self.lasttok == 'EXC':\n", "print(tok)\n", "tok.value = tok.value.strip()\n", "val = tok.value.upper()\n", "if val in self.reserved:\n", "tok.type = val\n", "if self.lasttok == 'WITH':\n", "self.lasttok = tok.type\n", "tok.type = 'EXC'\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_0(*VAR_0, **VAR_1):...\n", "VAR_2 = requests.Response()\n", "VAR_2.status_code = 200\n", "VAR_2._content_consumed = True\n", "return VAR_2\n" ]
[ "def mock_import_repository_task(*args, **kwargs):...\n", "resp = requests.Response()\n", "resp.status_code = 200\n", "resp._content_consumed = True\n", "return resp\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_26(self, VAR_14, VAR_30):...\n", "VAR_12 = \"%s '%s' '%s'\" % (VAR_5, VAR_30, VAR_14)\n", "FUNC_7(self.session, VAR_12)\n" ]
[ "def start_clone_session(self, comp_name, session_name):...\n", "cmd = \"%s '%s' '%s'\" % (SCRIPT_CLONE_PATH, session_name, comp_name)\n", "send_main_session_command(self.session, cmd)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_35(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 7}, 'CONFIDENCE': {'HIGH': 7}}\n", "self.check_example('skip.py', VAR_2, VAR_1=True)\n" ]
[ "def test_ignore_skip(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 7}, 'CONFIDENCE': {'HIGH': 7}}\n", "self.check_example('skip.py', expect, ignore_nosec=True)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_1(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = block.sysfs_to_devpath(VAR_1)\n", "VAR_12, VAR_13 = util.subp(['dmsetup', 'info', VAR_11, '-C', '-o', 'uuid',\n '--noheadings'], capture=True)\n", "return VAR_12.strip()\n" ]
[ "def get_dmsetup_uuid(device):...\n", "\"\"\"docstring\"\"\"\n", "blockdev = block.sysfs_to_devpath(device)\n", "out, _ = util.subp(['dmsetup', 'info', blockdev, '-C', '-o', 'uuid',\n '--noheadings'], capture=True)\n", "return out.strip()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "import praw\n", "import time\n", "from datetime import datetime\n", "from time import sleep\n", "from rpc_bindings import send, open_account, generate_account, generate_qr, nano_to_raw, receive_all, send_all, check_balance, validate_address, open_or_receive\n", "import mysql.connector\n", "import pprin...
[ "import praw\n", "import time\n", "from datetime import datetime\n", "from time import sleep\n", "from rpc_bindings import send, open_account, generate_account, generate_qr, nano_to_raw, receive_all, send_all, check_balance, validate_address, open_or_receive\n", "import mysql.connector\n", "import pprin...
[ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", ...
[ "def FUNC_26(self, VAR_14):...\n", "" ]
[ "def get_max_length(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "import os\n", "import unittest\n", "from coalib.bearlib.abstractions.Lint import Lint\n", "from coalib.misc.ContextManagers import prepare_file\n", "from coalib.misc.Shell import escape_path_argument\n", "from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY\n", "from coalib.results.SourceRange im...
[ "import os\n", "import unittest\n", "from coalib.bearlib.abstractions.Lint import Lint\n", "from coalib.misc.ContextManagers import prepare_file\n", "from coalib.misc.Shell import escape_path_argument\n", "from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY\n", "from coalib.results.SourceRange im...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Ex...
[ "def FUNC_15(self, VAR_8):...\n", "VAR_32 = []\n", "if VAR_8 == '':\n", "return []\n", "VAR_33 = Urtext.get_all_files(self.view.window())\n", "VAR_34 = []\n", "for file in VAR_33:\n", "if file[-4:] == '.txt':\n", "return VAR_34\n", "VAR_0 = this_file.read()\n", "VAR_31 = re.findall('-> ' + VAR_8...
[ "def get_links_to_file(self, filename):...\n", "visited_files = []\n", "if filename == '':\n", "return []\n", "files = Urtext.get_all_files(self.view.window())\n", "links_to_file = []\n", "for file in files:\n", "if file[-4:] == '.txt':\n", "return links_to_file\n", "contents = this_file.read()\n"...
[ 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'", "Assign'", "For", "Expr'" ]
[ "def FUNC_0(self, VAR_0, VAR_1, VAR_2, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = VAR_3.pop('kbsite_name', None)\n", "if not VAR_6:\n", "VAR_6 = 'default'\n", "VAR_0.kbsite = models.KegbotSite.objects.get(name=kbsite_name)\n", "return None\n" ]
[ "def process_view(self, request, view_func, view_args, view_kwargs):...\n", "\"\"\"docstring\"\"\"\n", "kbsite_name = view_kwargs.pop('kbsite_name', None)\n", "if not kbsite_name:\n", "kbsite_name = 'default'\n", "request.kbsite = models.KegbotSite.objects.get(name=kbsite_name)\n", "return None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_20(self, VAR_2):...\n", "if not self.logged_in():\n", "exit('send_cmd called before login')\n", "VAR_11 = FUNC_1()\n", "VAR_12, VAR_13, VAR_14 = VAR_11.exec_command('shrubbery {} {} '.format(self\n .user_creds[0], self.user_creds[1]) + VAR_2)\n", "print('***stdout: ' + VAR_13.read().decode('u...
[ "def send_cmd(self, command_string):...\n", "if not self.logged_in():\n", "exit('send_cmd called before login')\n", "client = open_ssh_client()\n", "stdin, stdout, stderr = client.exec_command('shrubbery {} {} '.format(self.\n user_creds[0], self.user_creds[1]) + command_string)\n", "print('***stdout: ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_1(self):...\n", "return 'submit source %s for task %s (ID %d) %s' % (self.source_path, self.\n task[1], self.task[0], self.url)\n" ]
[ "def describe(self):...\n", "return 'submit source %s for task %s (ID %d) %s' % (self.source_path, self.\n task[1], self.task[0], self.url)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "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'" ]
[ "\"\"\"\nThis module contains ...\n\"\"\"\n", "from __future__ import division, absolute_import\n", "import cPickle as pickle\n", "import pickle\n", "import os\n", "import time\n", "import fnmatch\n", "import hashlib\n", "import re\n", "import stat\n", "import errno\n", "from twisted.python im...
[ "\"\"\"\nThis module contains ...\n\"\"\"\n", "from __future__ import division, absolute_import\n", "import cPickle as pickle\n", "import pickle\n", "import os\n", "import time\n", "import fnmatch\n", "import hashlib\n", "import re\n", "import stat\n", "import errno\n", "from twisted.python im...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'...
[ "@tornado.web.authenticated...\n", "self.write(api.user.generate_token({'email': self.current_user}))\n" ]
[ "@tornado.web.authenticated...\n", "self.write(api.user.generate_token({'email': self.current_user}))\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_4 = '/api/apps/{app_id}/builds'.format(**locals())\n", "VAR_5 = self.client.get(VAR_4)\...
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/builds'.format(**locals())\n", "respon...
[ 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Ex...
[ "def FUNC_9(self, VAR_14):...\n", "self.cursor.execute('SELECT * FROM product_type WHERE name = %s;', (VAR_14,))\n", "return self.cursor.fetchone()\n" ]
[ "def find_type_by_name(self, type_name):...\n", "self.cursor.execute('SELECT * FROM product_type WHERE name = %s;', (type_name,)\n )\n", "return self.cursor.fetchone()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Return'" ]
[ "def FUNC_5(VAR_1, *VAR_2, **VAR_3):...\n", "def FUNC_6():...\n", "if not request.method in VAR_0:\n", "return True\n", "if not request.environ.get('AUTH_TYPE') == 'cookie':\n", "return True\n", "if config.get('skip_authentication'):\n", "return True\n", "if request.environ.get('HTTP_REFERER'):\n", ...
[ "def _decorate(f, *a, **kw):...\n", "def check():...\n", "if not request.method in methods:\n", "return True\n", "if not request.environ.get('AUTH_TYPE') == 'cookie':\n", "return True\n", "if config.get('skip_authentication'):\n", "return True\n", "if request.environ.get('HTTP_REFERER'):\n", "ref_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 5, 0 ]
[ "FunctionDef'", "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Condition", "Assign'", "Condition", "Assign'", "Return'", "Return'", "Condition", "AugAssign'", "Condition", "Condition", "Return'" ]
[ "def FUNC_1(self, VAR_1, VAR_2, VAR_5, VAR_6, VAR_4={}):...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = self.pool.get('stock.location')\n", "VAR_23 = self.pool.get('account.move')\n", "VAR_24 = self.pool.get('account.move.line')\n", "VAR_25 = VAR_6.get('new_price', 0.0)\n", "VAR_19 = VAR_6.get('stock_outpu...
[ "def do_change_standard_price(self, cr, uid, ids, datas, context={}):...\n", "\"\"\"docstring\"\"\"\n", "location_obj = self.pool.get('stock.location')\n", "move_obj = self.pool.get('account.move')\n", "move_line_obj = self.pool.get('account.move.line')\n", "new_price = datas.get('new_price', 0.0)\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "For", "For", "Return'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Condit...
[ "def FUNC_38(self, VAR_84):...\n", "return [VAR_82 for job in VAR_84.jobs for VAR_82 in job.subworkflow_input if\n job.subworkflow_input[VAR_82] is self]\n" ]
[ "def targets(self, dag):...\n", "return [f for job in dag.jobs for f in job.subworkflow_input if job.\n subworkflow_input[f] is self]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self):...\n", "self.order = list()\n" ]
[ "def __init__(self):...\n", "self.order = list()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_7(self):...\n", "return self.content\n" ]
[ "def read(self):...\n", "return self.content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(self):...\n", "return current_user.is_authenticated and current_user.role.role_code in self.roles_allowed\n" ]
[ "def is_accessible(self):...\n", "return current_user.is_authenticated and current_user.role.role_code in self.roles_allowed\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_0.errorhandler(404)...\n", "VAR_21 = uuid4()\n", "return render_template('404.html', VAR_21=cache_id), 404\n" ]
[ "@app.errorhandler(404)...\n", "cache_id = uuid4()\n", "return render_template('404.html', cache_id=cache_id), 404\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_4(self, VAR_10=None, VAR_11=False, VAR_12=False):...\n", "if VAR_10 is None:\n", "VAR_10 = self.prompt\n", "VAR_20 = ''\n", "VAR_21 = ''\n", "VAR_22 = ''\n", "VAR_23 = 0\n", "while True:\n", "VAR_24 = self.serial.read().decode('utf-8', 'replace')\n", "if not VAR_24:\n", "if self.option...
[ "def read_until(self, string=None, continuous=False, boot=False):...\n", "if string is None:\n", "string = self.prompt\n", "buff = ''\n", "event_buff = ''\n", "event_buff_logged = ''\n", "errors = 0\n", "while True:\n", "char = self.serial.read().decode('utf-8', 'replace')\n", "if not char:\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 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 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Condition", "Assign'", "Condition", "AugAssign'", "AugAssign'", "Expr'", "Condition", "Condition", "AugAssign'", "Assign'", "Condition", ...
[ "from django.core.exceptions import ObjectDoesNotExist\n", "from rest_framework import exceptions\n", "from app import models\n", "def FUNC_0(VAR_0, VAR_1, VAR_2=('view_project',)):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = models.Project.objects.get(pk=project_pk, deleting=False)\n", "return VAR_6\n",...
[ "from django.core.exceptions import ObjectDoesNotExist\n", "from rest_framework import exceptions\n", "from app import models\n", "def get_and_check_project(request, project_pk, perms=('view_project',)):...\n", "\"\"\"docstring\"\"\"\n", "project = models.Project.objects.get(pk=project_pk, deleting=False)...
[ 1, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Docstring", "Assign'", "Return'", "For", "Condition" ]
[ "def FUNC_12(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_29 = self.config_file()\n", "VAR_21 = ''\n", "if VAR_29 is not None:\n", "for VAR_34, line in enumerate(VAR_29):\n", "return VAR_21\n", "VAR_29[VAR_34] = line if line.endswith('\\n') else line + '\\n'\n", "VAR_32, VAR_21 = tempfile.mkstemp()...
[ "def generate_config_file(self):...\n", "\"\"\"docstring\"\"\"\n", "config_lines = self.config_file()\n", "config_file = ''\n", "if config_lines is not None:\n", "for i, line in enumerate(config_lines):\n", "return config_file\n", "config_lines[i] = line if line.endswith('\\n') else line + '\\n'\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "For", "Return'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "import json\n", "from django import template\n", "from django.db.models import Max, Min\n", "from django.template.loader import render_to_string\n", "from django.utils import timezone\n", "from django.utils.translation import ugettext_lazy as _\n", "from course.models import CourseModule\n", "from li...
[ "import json\n", "from django import template\n", "from django.db.models import Max, Min\n", "from django.template.loader import render_to_string\n", "from django.utils import timezone\n", "from django.utils.translation import ugettext_lazy as _\n", "from course.models import CourseModule\n", "from li...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_2(self, VAR_2):...\n", "if not self.get_options().transitive:\n", "VAR_2 = self.context.target_roots\n", "VAR_3 = tuple(target.sources_snapshot(scheduler=self.context._scheduler) for\n target in VAR_2)\n", "VAR_4 = {f.path for snapshot in VAR_3 for f in snapshot.files}\n", "VAR_13 = os.path.j...
[ "def console_output(self, targets):...\n", "if not self.get_options().transitive:\n", "targets = self.context.target_roots\n", "input_snapshots = tuple(target.sources_snapshot(scheduler=self.context.\n _scheduler) for target in targets)\n", "input_files = {f.path for snapshot in input_snapshots for f in ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Condition", "Expr'", "For", "Expr'" ]
[ "def FUNC_1(self):...\n", "return 'submit sources %s for task %s (ID %d) %s' % (repr(self.filenames),\n self.task[1], self.task[0], self.url)\n" ]
[ "def describe(self):...\n", "return 'submit sources %s for task %s (ID %d) %s' % (repr(self.filenames),\n self.task[1], self.task[0], self.url)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_18(self, VAR_19):...\n", "" ]
[ "def select_source(self, source_file_path):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_25(self, VAR_25):...\n", "self.__logger.debug('Traversing %s->%s with %s' % (self._src_prx, self.\n _tgt_prx, VAR_25))\n" ]
[ "def __log_run(self, visitor):...\n", "self.__logger.debug('Traversing %s->%s with %s' % (self._src_prx, self.\n _tgt_prx, visitor))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_15(self, **VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "self.sessionhandler.data_out(self, **kwargs)\n" ]
[ "def data_out(self, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "self.sessionhandler.data_out(self, **kwargs)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_3(self):...\n", "self.assertFalse(self.course.is_teacher(self.user))\n", "self.assertFalse(self.current_course_instance.is_assistant(self.user))\n", "self.assertFalse(self.current_course_instance.is_teacher(self.user))\n", "self.assertFalse(self.current_course_instance.is_course_staff(self.user))\...
[ "def test_course_staff(self):...\n", "self.assertFalse(self.course.is_teacher(self.user))\n", "self.assertFalse(self.current_course_instance.is_assistant(self.user))\n", "self.assertFalse(self.current_course_instance.is_teacher(self.user))\n", "self.assertFalse(self.current_course_instance.is_course_staff(s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "...
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_snapshot(VAR_8)\n", "self.common.client_logout()\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_snapshot(snapshot)\n", "self.common.client_logout()\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "import logging\n", "import tempfile\n", "import uuid\n", "from odoo import api, registry, fields, models, _\n", "from odoo.tools import mod10r\n", "from odoo.tools.config import config\n", "from odoo.addons.base_geoengine.fields import GeoPoint\n", "from odoo.addons.base_geoengine import fields as ge...
[ "import logging\n", "import tempfile\n", "import uuid\n", "from odoo import api, registry, fields, models, _\n", "from odoo.tools import mod10r\n", "from odoo.tools.config import config\n", "from odoo.addons.base_geoengine.fields import GeoPoint\n", "from odoo.addons.base_geoengine import fields as ge...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Import'", "Expr'", "Expr'", "Import'", "Assign'", "ImportFrom'", "FunctionDef'", "ImportFrom'", "Docstring", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_8 = 'test_foo.py:FooTest'\n", "VAR_7 = BokChoyTestSuite('', test_spec=spec)\n", "VAR_1 = 'tests/{}'.format(VAR_8)\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name))\n" ]
[ "def test_class_spec(self):...\n", "spec = 'test_foo.py:FooTest'\n", "suite = BokChoyTestSuite('', test_spec=spec)\n", "name = 'tests/{}'.format(spec)\n", "self.assertEqual(suite.cmd, self._expected_command(name=name))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_7(self):...\n", "vimsupport.PostVimMessage('Restarting ycmd server...')\n", "self._user_notified_about_crash = False\n", "self._ServerCleanup()\n", "self._SetupServer()\n" ]
[ "def RestartServer(self):...\n", "vimsupport.PostVimMessage('Restarting ycmd server...')\n", "self._user_notified_about_crash = False\n", "self._ServerCleanup()\n", "self._SetupServer()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_3(VAR_2, VAR_3):...\n", "VAR_15 = set()\n", "for level in VAR_2:\n", "VAR_24 = level[0]\n", "return VAR_15\n", "VAR_11 = level[1]\n", "VAR_15 |= VAR_0[VAR_24].get_parameters(VAR_11, VAR_3)\n" ]
[ "def get_rule_parameters(levellist, doc):...\n", "ret = set()\n", "for level in levellist:\n", "leveltype = level[0]\n", "return ret\n", "levelfields = level[1]\n", "ret |= FnLevel[leveltype].get_parameters(levelfields, doc)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'", "Assign'", "AugAssign'" ]
[ "def FUNC_6(self, VAR_23):...\n", "VAR_82 = CLASS_46.run(self, VAR_23)\n", "if not VAR_82 or not hasattr(VAR_82, 'email') or not VAR_82.email:\n", "return self.error(errors.NO_EMAIL_FOR_USER)\n", "return VAR_82\n" ]
[ "def run(self, name):...\n", "user = VExistingUname.run(self, name)\n", "if not user or not hasattr(user, 'email') or not user.email:\n", "return self.error(errors.NO_EMAIL_FOR_USER)\n", "return user\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_9(VAR_20, VAR_21, VAR_22=None):...\n", "VAR_45 = VAR_5[VAR_20]\n", "VAR_21 = str(VAR_21)\n", "VAR_22 = VAR_22 or ''\n", "VAR_46 = VAR_22, VAR_21\n", "VAR_0.info('Removing %s from targets[%s]', repr(VAR_46), VAR_20)\n", "VAR_45.remove(VAR_46)\n" ]
[ "def remove_target(domain, id_, tuser=None):...\n", "tlist = targets[domain]\n", "id_ = str(id_)\n", "tuser = tuser or ''\n", "t = tuser, id_\n", "logger.info('Removing %s from targets[%s]', repr(t), domain)\n", "tlist.remove(t)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_4(self):...\n", "VAR_6 = Script.objects.annotate(num_ets=Count('extractedtext')).filter(\n num_ets__lt=100).filter(script_type='EX').first()\n", "VAR_2 = ExtractedText.objects.filter(qa_group=None).filter(extraction_script\n =scr).filter(data_document__data_group__group_type__code='CO').first()....
[ "def test_data_document_qa(self):...\n", "scr = Script.objects.annotate(num_ets=Count('extractedtext')).filter(\n num_ets__lt=100).filter(script_type='EX').first()\n", "pk = ExtractedText.objects.filter(qa_group=None).filter(extraction_script=scr\n ).filter(data_document__data_group__group_type__code='CO'...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "@renderer...\n", "if self._error_msg is not None:\n", "return VAR_8(self._error_msg)\n", "return VAR_8('')\n" ]
[ "@renderer...\n", "if self._error_msg is not None:\n", "return tag(self._error_msg)\n", "return tag('')\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_2(self, VAR_6, VAR_7):...\n", "VAR_14 = \"SELECT Pass FROM user WHERE Email = '\" + VAR_6 + \"'\"\n", "self.cursor.execute(VAR_14)\n", "VAR_15 = self.cursor.fetchone()\n", "VAR_4 = ' '.join(map(str, VAR_15))\n", "return check_password_hash(VAR_4, VAR_7)\n" ]
[ "def verify_account(self, email, user_password):...\n", "query = \"SELECT Pass FROM user WHERE Email = '\" + email + \"'\"\n", "self.cursor.execute(query)\n", "fetch = self.cursor.fetchone()\n", "password = ' '.join(map(str, fetch))\n", "return check_password_hash(password, user_password)\n" ]
[ 0, 4, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "from argparse import ArgumentParser\n", "import utilities\n", "VAR_0 = ArgumentParser(description=\n 'The Dynamic Robust Single Event Upset Simulator was created by Ed Carlisle IV'\n , epilog=\n 'Begin by creating a new campaign with \"%(prog)s new APPLICATION\". Then run injections with \"%(prog)s in...
[ "from argparse import ArgumentParser\n", "import utilities\n", "parser = ArgumentParser(description=\n 'The Dynamic Robust Single Event Upset Simulator was created by Ed Carlisle IV'\n , epilog=\n 'Begin by creating a new campaign with \"%(prog)s new APPLICATION\". Then run injections with \"%(prog)s i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0...
[ "ImportFrom'", "Import'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr...
[ "def FUNC_39(VAR_101):...\n", "VAR_101.resources = VAR_76, VAR_52\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.resources = args, resources\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_0(self):...\n", "if self.label:\n", "return self.label\n", "if self.model_field:\n", "return self.model_field.verbose_name.title()\n", "if self.field_name == '__str__':\n", "return self.model._meta.verbose_name.title()\n", "VAR_10 = getattr(self.model, self.field_name)\n", "return self.fie...
[ "def get_title(self):...\n", "if self.label:\n", "return self.label\n", "if self.model_field:\n", "return self.model_field.verbose_name.title()\n", "if self.field_name == '__str__':\n", "return self.model._meta.verbose_name.title()\n", "field = getattr(self.model, self.field_name)\n", "return self.f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Assign'", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_0(self, VAR_1=True):...\n", "self.is_api = VAR_1\n", "self.assets = Environment(os.path.join(os.path.dirname(__file__),\n '../static'), '/static')\n", "VAR_11 = Bundle('css/bootstrap.min.css', 'css/material.min.css', Bundle(\n 'css/schoolcms.css', 'css/dropdown.css', filters='cssmin'),\n 'o...
[ "def initialize(self, is_api=True):...\n", "self.is_api = is_api\n", "self.assets = Environment(os.path.join(os.path.dirname(__file__),\n '../static'), '/static')\n", "css_all = Bundle('css/bootstrap.min.css', 'css/material.min.css', Bundle(\n 'css/schoolcms.css', 'css/dropdown.css', filters='cssmin'),\...
[ 0, 0, 5, 5, 5, 5, 5 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_24(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = 'os-chmod-{}.py'\n", "if six.PY2:\n", "VAR_8 = VAR_8.format('py2')\n", "VAR_8 = VAR_8.format('py3')\n", "VAR_2 = {'SEVERITY': {'MEDIUM': 2, 'HIGH': 8}, 'CONFIDENCE': {'MEDIUM': 1,\n 'HIGH': 9}}\n", "self.check_example(VAR_8, VAR_2)\n" ]
[ "def test_os_chmod(self):...\n", "\"\"\"docstring\"\"\"\n", "filename = 'os-chmod-{}.py'\n", "if six.PY2:\n", "filename = filename.format('py2')\n", "filename = filename.format('py3')\n", "expect = {'SEVERITY': {'MEDIUM': 2, 'HIGH': 8}, 'CONFIDENCE': {'MEDIUM': 1,\n 'HIGH': 9}}\n", "self.check_exam...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_1, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "super(CLASS_1, self).__init__(VAR_1, VAR_2)\n" ]
[ "def __init__(self, pid, comp_name):...\n", "\"\"\"docstring\"\"\"\n", "super(LocalComponentMonitoringJob, self).__init__(pid, comp_name)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def __init__(self, VAR_3):...\n", "self._data = VAR_3\n" ]
[ "def __init__(self, data):...\n", "self._data = data\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def FUNC_6(self):...\n", "self.login()\n", "while True:\n", "VAR_29 = random.random()\n", "VAR_30 = random.choice(self.tasks)\n", "if VAR_29 < 0.1 and self.submissions_path is not None:\n", "self.do_step(SubmitRandomRequest(self.browser, VAR_30, VAR_10=self.base_url,\n VAR_11=self.submissions_path))...
[ "def act(self):...\n", "self.login()\n", "while True:\n", "choice = random.random()\n", "task = random.choice(self.tasks)\n", "if choice < 0.1 and self.submissions_path is not None:\n", "self.do_step(SubmitRandomRequest(self.browser, task, base_url=self.base_url,\n submissions_path=self.submissions_p...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_0, VAR_1=None, VAR_2=None, VAR_3=False, VAR_4=False,...\n", "super(CLASS_0, self).__init__(*VAR_5, **kwargs)\n", "self.rel_model = VAR_0\n", "self.reference = VAR_1 or VAR_0._meta.fields['id']\n", "self.related_name = VAR_2\n", "self.on_delete = VAR_3\n", "self.on_update = VAR_4\...
[ "def __init__(self, rel_model, reference=None, related_name=None, on_delete=...\n", "super(ForeignKeyField, self).__init__(*args, **kwargs)\n", "self.rel_model = rel_model\n", "self.reference = reference or rel_model._meta.fields['id']\n", "self.related_name = related_name\n", "self.on_delete = on_delete\...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name, 'size': 1}\n", "self.driver._eql_execute('volume', 'create', VAR_1['name'], '%sG' % VAR_1[\n 'size'], 'pool', self.configuration.eqlx_pool, 'thin-provision').AndReturn...
[ "def test_create_volume(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name, 'size': 1}\n", "self.driver._eql_execute('volume', 'create', volume['name'], '%sG' % volume\n ['size'], 'pool', self.configuration.eqlx_pool, 'thin-provis...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@VAR_2.route('/tournament_wins')...\n", "if VAR_0 == None:\n", "FUNC_16()\n", "VAR_5 = request.args.get('tag', default=None)\n", "VAR_19 = request.args.get('date', default=None)\n", "if VAR_5 and VAR_19:\n", "VAR_8 = 'string'.format(VAR_5, VAR_5, VAR_19)\n", "return ''\n", "VAR_7 = VAR_0.exec(VAR_8...
[ "@endpoints.route('/tournament_wins')...\n", "if db == None:\n", "init()\n", "tag = request.args.get('tag', default=None)\n", "date = request.args.get('date', default=None)\n", "if tag and date:\n", "sql = (\n \"select player1, place, date, score from matches join placings on matches.url=placings.url...
[ 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@property...\n", "if self.redirection_source.encoding:\n", "return self.redirection_source.encoding\n", "return 'utf8'\n" ]
[ "@property...\n", "if self.redirection_source.encoding:\n", "return self.redirection_source.encoding\n", "return 'utf8'\n" ]
[ 0, 0, 0, 6 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_19(self, VAR_16, VAR_20, VAR_21=False, **VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', VAR_16['name'], 'access', 'delete', '1')\n", "VAR_0.error(_('Failed to terminate connection to volume %s'), VAR_16['name'])\n" ]
[ "def terminate_connection(self, volume, connector, force=False, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', volume['name'], 'access', 'delete', '1')\n", "LOG.error(_('Failed to terminate connection to volume %s'), volume['name'])\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]