lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_7(self, VAR_12, VAR_10='main', VAR_13=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_14, VAR_18, VAR_24, VAR_25 = VAR_12\n", "VAR_14, VAR_18, VAR_24 = VAR_12\n", "VAR_31 = 'string' % {'database': VAR_10}\n", "VAR_25 = 0\n", "VAR_32 = {'input_phrase': VAR_14, 'phrase': VAR_18}\n", "if self.db....
[ "def add_phrase(self, aphrase, database='main', commit=True):...\n", "\"\"\"docstring\"\"\"\n", "input_phrase, phrase, freq, user_freq = aphrase\n", "input_phrase, phrase, freq = aphrase\n", "select_sqlstr = (\n \"\"\"\n SELECT * FROM %(database)s.phrases\n WHERE input_phrase = :input_phras...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Import'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_8(self, VAR_13):...\n", "\"\"\"docstring\"\"\"\n", "return self.Command(bin_dir_path=os.path.join(self.yarnpkg_path, 'bin'),\n VAR_14='yarnpkg', VAR_13=args or [])\n" ]
[ "def yarnpkg_command(self, args):...\n", "\"\"\"docstring\"\"\"\n", "return self.Command(bin_dir_path=os.path.join(self.yarnpkg_path, 'bin'),\n executable='yarnpkg', args=args or [])\n" ]
[ 0, 0, 2 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_1(VAR_0):...\n", "return FUNC_0(VAR_0, [])\n" ]
[ "def home(request):...\n", "return make_view(request, [])\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "\"\"\"SchoolCMS announce handlers.\n\nhandlers.\n\"\"\"\n", "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "from . import BaseHandler\n", "from ..db import Announce, AnnTag, TempFileList, AttachmentList, Record, GroupLis...
[ "\"\"\"SchoolCMS announce handlers.\n\nhandlers.\n\"\"\"\n", "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "from . import BaseHandler\n", "from ..db import Announce, AnnTag, TempFileList, AttachmentList, Record, GroupLis...
[ 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'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Return'", "C...
[ "import logging\n", "from odoo import fields, http, _\n", "from odoo.exceptions import ValidationError, UserError\n", "VAR_0 = logging.getLogger(__name__)\n", "@http.route(['/fit_subscribe_controller/subscribe'], type='http', auth=...\n", "VAR_1 = int(VAR_1)\n", "VAR_2 = VAR_2\n", "VAR_4 = http.reques...
[ "import logging\n", "from odoo import fields, http, _\n", "from odoo.exceptions import ValidationError, UserError\n", "_logger = logging.getLogger(__name__)\n", "@http.route(['/fit_subscribe_controller/subscribe'], type='http', auth=...\n", "event_id = int(event_id)\n", "event_is_participating = event_i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "For", "Assign'", "For", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Condition", "Condition", "Expr'", "Return'"...
[ "def FUNC_25(VAR_8):...\n", "VAR_27 = []\n", "for VAR_45 in VAR_8:\n", "VAR_27.append({'id': VAR_45.id, 'text': VAR_45.text})\n", "return VAR_27\n" ]
[ "def _select2_list(search_results):...\n", "select2_results = []\n", "for r in search_results:\n", "select2_results.append({'id': r.id, 'text': r.text})\n", "return select2_results\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Expr'", "Return'" ]
[ "def FUNC_7(self):...\n", "return self.content\n" ]
[ "def read(self):...\n", "return self.content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@property...\n", "return self.dag.priority(self)\n" ]
[ "@property...\n", "return self.dag.priority(self)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "import logging\n", "import os\n", "import random\n", "import re\n", "import tempfile\n", "from cms.grading.languagemanager import filename_to_language\n", "from cmsc...
[ "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "import logging\n", "import os\n", "import random\n", "import re\n", "import tempfile\n", "from cms.grading.languagemanager import filename_to_language\n", "from cmsc...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_15(self):...\n", "\"\"\"docstring\"\"\"\n", "self.console.info('')\n", "if not self.node_list and not self.master.connected:\n", "self._exit(\n \"\"\"No nodes were detected, or nodes do not have sos installed.\nAborting...\"\"\"\n )\n", "self.console.info('The following is a list of nodes ...
[ "def intro(self):...\n", "\"\"\"docstring\"\"\"\n", "self.console.info('')\n", "if not self.node_list and not self.master.connected:\n", "self._exit(\n \"\"\"No nodes were detected, or nodes do not have sos installed.\nAborting...\"\"\"\n )\n", "self.console.info('The following is a list of nodes to...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "For", "Expr'", "Expr'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_3(VAR_3, VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = \"\"\"\n SELECT name\n FROM pg_settings\n WHERE name = '%s'\n \"\"\"\n", "VAR_3.execute(VAR_7 % VAR_4)\n", "return VAR_3.rowcount > 0\n" ]
[ "def option_exists(cursor, option):...\n", "\"\"\"docstring\"\"\"\n", "query = \"\"\"\n SELECT name\n FROM pg_settings\n WHERE name = '%s'\n \"\"\"\n", "cursor.execute(query % option)\n", "return cursor.rowcount > 0\n" ]
[ 0, 0, 4, 0, 4 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_3):...\n", "if VAR_3 is not None:\n", "VAR_10 = [injection_.target for injection_ in injection.objects.filter(\n result=record.id)]\n", "VAR_10 = []\n", "for VAR_21 in range(len(VAR_10)):\n", "if VAR_10[VAR_21] is None:\n", "if len(VAR_10) > 0:\n", "VAR_10[VAR_21] = '-'\n", ...
[ "def render_targets(self, record):...\n", "if record is not None:\n", "targets = [injection_.target for injection_ in injection.objects.filter(\n result=record.id)]\n", "targets = []\n", "for index in range(len(targets)):\n", "if targets[index] is None:\n", "if len(targets) > 0:\n", "targets[index]...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "For", "Condition", "Condition", "Assign'", "Return'", "Return'" ]
[ "def FUNC_24(self, VAR_16):...\n", "" ]
[ "def local_path(self, volume):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "import subprocess\n", "import shlex\n", "import os\n", "import signal\n", "from helper import path_dict, path_number_of_files, pdf_stats, pdf_date_format_to_datetime\n", "import json\n", "from functools import wraps\n", "from urllib.parse import urlparse\n", "from flask import Flask, render_templat...
[ "import subprocess\n", "import shlex\n", "import os\n", "import signal\n", "from helper import path_dict, path_number_of_files, pdf_stats, pdf_date_format_to_datetime\n", "import json\n", "from functools import wraps\n", "from urllib.parse import urlparse\n", "from flask import Flask, render_templat...
[ 0, 0, 0, 0, 0, 0, 0, 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'", "Import'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "A...
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = self.test_release()\n", "VAR_15 = Release.objects.get(uuid=release3['uuid'])\n", "self.assertIn('autotest deployed ', VAR_15.summary)\n" ]
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "release3 = self.test_release()\n", "release = Release.objects.get(uuid=release3['uuid'])\n", "self.assertIn('autotest deployed ', release.summary)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_37=None, VAR_38=None, VAR_39=False):...\n", "\"\"\"docstring\"\"\"\n", "list.__init__(self)\n", "self._names = dict()\n", "if VAR_37:\n", "self.extend(map(str, VAR_37) if VAR_39 else VAR_37)\n", "if VAR_38:\n", "if isinstance(VAR_37, CLASS_2):\n", "for VAR_44, item in VAR_38....
[ "def __init__(self, toclone=None, fromdict=None, plainstr=False):...\n", "\"\"\"docstring\"\"\"\n", "list.__init__(self)\n", "self._names = dict()\n", "if toclone:\n", "self.extend(map(str, toclone) if plainstr else toclone)\n", "if fromdict:\n", "if isinstance(toclone, Namedlist):\n", "for key, ite...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Condition", "For", "Expr'", "Expr'", "Expr'" ]
[ "def __exit__(self, VAR_15, VAR_16, VAR_17):...\n", "VAR_33 = self._transactions.pop()\n", "if VAR_15 is None:\n", "VAR_33.commit()\n", "VAR_33.rollback()\n" ]
[ "def __exit__(self, type, value, traceback):...\n", "transaction = self._transactions.pop()\n", "if type is None:\n", "transaction.commit()\n", "transaction.rollback()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_4(self):...\n", "VAR_59 = defer.Deferred()\n", "self.account = IMAPAccount(self._user_id, self.soledad, VAR_59)\n", "return VAR_59\n" ]
[ "def _initialize_imap_account(self):...\n", "account_ready_cb = defer.Deferred()\n", "self.account = IMAPAccount(self._user_id, self.soledad, account_ready_cb)\n", "return account_ready_cb\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "import logging\n", "from datetime import datetime\n", "from dateutil.relativedelta import relativedelta\n", "from odoo import fields, models\n", "VAR_0 = logging.getLogger(__name__)\n", "VAR_1 = 'res.partner'\n", "VAR_2 = ['res.partner']\n", "VAR_3 = fields.One2many(comodel_name='fit.subscription', i...
[ "import logging\n", "from datetime import datetime\n", "from dateutil.relativedelta import relativedelta\n", "from odoo import fields, models\n", "_logger = logging.getLogger(__name__)\n", "_name = 'res.partner'\n", "_inherit = ['res.partner']\n", "fit_subscriptions = fields.One2many(comodel_name='fit...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "For", "AugAssign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Return'", "Return...
[ "def FUNC_8(VAR_17):...\n", "if VAR_17 != -1:\n", "VAR_24 = CLASS_0(self.sorted_menu[VAR_17][2])\n", "VAR_25 = self.window.open_file(self.sorted_menu[VAR_17][2])\n" ]
[ "def open_the_file(index):...\n", "if index != -1:\n", "urtext_file = UrtextFile(self.sorted_menu[index][2])\n", "new_view = self.window.open_file(self.sorted_menu[index][2])\n" ]
[ 0, 0, 1, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'" ]
[ "def __enter__(self):...\n", "\"\"\"docstring\"\"\"\n", "self.start_time = time.time()\n", "return self\n" ]
[ "def __enter__(self):...\n", "\"\"\"docstring\"\"\"\n", "self.start_time = time.time()\n", "return self\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_74):...\n", "if VAR_74 and (not self.domain_re.match(VAR_74) or VAR_74.endswith(\n", "VAR_101.errors.add(errors.BAD_CNAME)\n", "if VAR_74:\n", "return VAR_100(VAR_74).lower()\n", "VAR_101.errors.add(errors.BAD_CNAME)\n" ]
[ "def run(self, domain):...\n", "if domain and (not self.domain_re.match(domain) or domain.endswith(\n", "c.errors.add(errors.BAD_CNAME)\n", "if domain:\n", "return str(domain).lower()\n", "c.errors.add(errors.BAD_CNAME)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Return'", "Expr'" ]
[ "@app.route('/api/images/<type>/<image>/ready', methods=['GET'])...\n", "if FUNC_34(VAR_11).lookup(VAR_12, file_required=False).is_ready():\n", "return {'ready': True}\n" ]
[ "@app.route('/api/images/<type>/<image>/ready', methods=['GET'])...\n", "if get_image_database(type).lookup(image, file_required=False).is_ready():\n", "return {'ready': True}\n" ]
[ 0, 0, 0 ]
[ "Condition", "Condition", "Return'" ]
[ "\"\"\"string\"\"\"\n", "from collections import defaultdict\n", "from everest.repositories.memory.querying import MemoryQuery\n", "from everest.repositories.state import EntityStateManager\n", "from itertools import islice\n", "from weakref import WeakValueDictionary\n", "__docformat__ = 'reStructuredT...
[ "\"\"\"\nEntity cache and cache map.\n\nThis file is part of the everest project.\nSee LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.\n\nCreated on Feb 26, 2013.\n\"\"\"\n", "from collections import defaultdict\n", "from everest.repositories.memory.querying import MemoryQuery\n", "fr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Return'" ]
[ "def __repr__(self):...\n", "return u'Nested({})'.format(repr(self.nested_columns))\n" ]
[ "def __repr__(self):...\n", "return u'Nested({})'.format(repr(self.nested_columns))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = self.bindings['TEST_AWS_REGION']\n", "VAR_9 = self.agent.type_to_payload('deleteAmazonLoadBalancerDescription', {\n 'credentials': self.bindings['AWS_CREDENTIALS'], 'regions': [VAR_5],\n 'loadBalancerName': self.__use_lb_name})\n", "VAR_10 ...
[ "def delete_load_balancer(self):...\n", "\"\"\"docstring\"\"\"\n", "region = self.bindings['TEST_AWS_REGION']\n", "payload = self.agent.type_to_payload('deleteAmazonLoadBalancerDescription',\n {'credentials': self.bindings['AWS_CREDENTIALS'], 'regions': [region],\n 'loadBalancerName': self.__use_lb_name...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_28 = None\n", "VAR_29 = requests.post('https://api.dropbox.com/1/metadata/link', VAR_28=\n dict(link=DROPBOX_FOLDER_LINK, client_id=DROPBOX_APP_KEY, client_secret\n =DROPBOX_SECRET_KEY, path=filepath), timeout=5)\n", "if VAR_29.ok:\n", "VAR_29 = ...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "data = None\n", "req = requests.post('https://api.dropbox.com/1/metadata/link', data=dict(\n link=DROPBOX_FOLDER_LINK, client_id=DROPBOX_APP_KEY, client_secret=\n DROPBOX_SECRET_KEY, path=filepath), timeout=5)\n", "if req.ok:\n", "req = json.loads(re...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Return'", "Condition", "Assign'" ]
[ "@integration_synonym_api...\n", "FUNC_2(VAR_2)\n", "FUNC_3(VAR_2, 'PHEEL', VAR_7='1')\n", "FUNC_5(VAR_4, VAR_5, VAR_11='FEEL', VAR_10=[{'name': '----FEEL'}, {'name':\n 'PHEEL'}])\n" ]
[ "@integration_synonym_api...\n", "clean_database(solr)\n", "seed_database_with(solr, 'PHEEL', id='1')\n", "verify_results(client, jwt, query='FEEL', expected=[{'name': '----FEEL'}, {\n 'name': 'PHEEL'}])\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_23(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.local:\n", "return True\n", "self.client.close()\n", "self.log_error('Error closing SSH session: %s' % VAR_68)\n", "self.connected = False\n", "return False\n", "return True\n" ]
[ "def close_ssh_session(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.local:\n", "return True\n", "self.client.close()\n", "self.log_error('Error closing SSH session: %s' % e)\n", "self.connected = False\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Expr'", "Expr'", "Assign'", "Return'", "Return'" ]
[ "@VAR_0.before_request...\n", "g.user = None\n", "if 'username' in VAR_19:\n", "g.user = VAR_19['username']\n" ]
[ "@app.before_request...\n", "g.user = None\n", "if 'username' in session:\n", "g.user = session['username']\n" ]
[ 0, 0, 0, 0 ]
[ "For", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_11():...\n", "\"\"\"docstring\"\"\"\n", "if os.path.isfile(VAR_0):\n", "VAR_22 = yaml.load(goals_file)\n", "click.echo(\n 'There are no goals set. Set a new goal by entering \"yoda goals new\"')\n", "if len(VAR_22):\n", "VAR_22['entries'].sort(key=lambda x: x['deadline'].split('-'))\n", "...
[ "def list_goals():...\n", "\"\"\"docstring\"\"\"\n", "if os.path.isfile(GOALS_CONFIG_FILE_PATH):\n", "contents = yaml.load(goals_file)\n", "click.echo(\n 'There are no goals set. Set a new goal by entering \"yoda goals new\"')\n", "if len(contents):\n", "contents['entries'].sort(key=lambda x: x['dead...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "AugAssign'", "Expr'", "AugAssign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", ...
[ "def FUNC_6(self, VAR_41):...\n", "if VAR_41:\n", "VAR_95 = Thing._by_fullname(VAR_41, False, data=True)\n", "abort(403, 'forbidden')\n", "if isinstance(VAR_95, Message):\n", "return VAR_95\n", "VAR_52 = VAR_95.subreddit_slow\n", "if VAR_101.user_is_loggedin and VAR_52.can_comment(VAR_101.user):\n", ...
[ "def run(self, fullname):...\n", "if fullname:\n", "parent = Thing._by_fullname(fullname, False, data=True)\n", "abort(403, 'forbidden')\n", "if isinstance(parent, Message):\n", "return parent\n", "sr = parent.subreddit_slow\n", "if c.user_is_loggedin and sr.can_comment(c.user):\n", "return parent\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Expr'", "Condition", "Return'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_20(VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = os.path.normpath(VAR_8)\n", "VAR_33 = re.search('{[^{]', VAR_8)\n", "VAR_34 = os.path.dirname(VAR_8[:VAR_33.start()]\n ) if VAR_33 else os.path.dirname(VAR_8)\n", "if not VAR_34:\n", "VAR_34 = '.'\n", "VAR_35 = [VAR_29.group('name') fo...
[ "def glob_wildcards(pattern):...\n", "\"\"\"docstring\"\"\"\n", "pattern = os.path.normpath(pattern)\n", "first_wildcard = re.search('{[^{]', pattern)\n", "dirname = os.path.dirname(pattern[:first_wildcard.start()]\n ) if first_wildcard else os.path.dirname(pattern)\n", "if not dirname:\n", "dirname ...
[ 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'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "For", "Return'", "Condition", "Assign'", "Assign'", "Condition", "For", "Expr'" ]
[ "def FUNC_14(self, VAR_10, VAR_11):...\n", "VAR_24 = self.common._cli_run('createhost -add %s %s' % (VAR_10, ' '.join(\n VAR_11)), None)\n" ]
[ "def _modify_3par_fibrechan_host(self, hostname, wwn):...\n", "out = self.common._cli_run('createhost -add %s %s' % (hostname, ' '.join(\n wwn)), None)\n" ]
[ 0, 2 ]
[ "FunctionDef'", "Assign'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._webui_url\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._webui_url\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = self.test_release()\n", "VAR_15 = Release.objects.get(uuid=release3['uuid'])\n", "self.assertEqual(str(VAR_15), '{}-v3'.format(VAR_11['app']))\n" ]
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "release3 = self.test_release()\n", "release = Release.objects.get(uuid=release3['uuid'])\n", "self.assertEqual(str(release), '{}-v3'.format(release3['app']))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'" ]
[ "from tkinter import *\n", "from addRecipe import AddARecipe\n", "from tkinter import messagebox\n", "import datetime\n", "from mealPlan import MakeMealPlan\n", "from PIL import Image, ImageTk\n", "import sqlite3\n", "VAR_0 = 'Trebuchet MS', 24\n", "VAR_1 = 'Trebuchet MS', 12\n", "VAR_2 = []\n", ...
[ "from tkinter import *\n", "from addRecipe import AddARecipe\n", "from tkinter import messagebox\n", "import datetime\n", "from mealPlan import MakeMealPlan\n", "from PIL import Image, ImageTk\n", "import sqlite3\n", "LARGE_FONT = 'Trebuchet MS', 24\n", "MEDIUM_FONT = 'Trebuchet MS', 12\n", "recip...
[ 0, 0, 0, 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, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "E...
[ "def FUNC_22(self, VAR_14):...\n", "if self.is_relation_many_to_one(VAR_14):\n", "VAR_34 = self.get_relation_fk(VAR_14)\n", "return self.list_columns[VAR_14].nullable\n", "return False\n", "return VAR_34.nullable\n" ]
[ "def is_nullable(self, col_name):...\n", "if self.is_relation_many_to_one(col_name):\n", "col = self.get_relation_fk(col_name)\n", "return self.list_columns[col_name].nullable\n", "return False\n", "return col.nullable\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Return'", "Return'" ]
[ "@app.route('/')...\n", "return render_template('home.html')\n" ]
[ "@app.route('/')...\n", "return render_template('home.html')\n" ]
[ 0, 3 ]
[ "Condition", "Return'" ]
[ "@functools.wraps(VAR_9)...\n", "VAR_19 = {'$schema': 'http://json-schema.org/draft-07/schema#',\n 'definitions': {'tag': {'type': 'object', 'required': ['namespace',\n 'predicate', 'value'], 'properties': {'namespace': {'type': 'string'},\n 'predicate': {'type': 'string'}, 'value': {'type': ['number', '...
[ "@functools.wraps(func)...\n", "request_schema = {'$schema': 'http://json-schema.org/draft-07/schema#',\n 'definitions': {'tag': {'type': 'object', 'required': ['namespace',\n 'predicate', 'value'], 'properties': {'namespace': {'type': 'string'},\n 'predicate': {'type': 'string'}, 'value': {'type': ['num...
[ 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'", "Return'" ]
[ "def __init__(self, VAR_10, VAR_11=None, VAR_12=None):...\n", "BaseResource.__init__(self, VAR_10)\n", "self._static_folder = FUNC_1()\n", "self._startup_folder = FUNC_0()\n", "self._portal = VAR_11\n", "self._disclaimer_banner = VAR_12\n", "self.putChild('startup-assets', File(self._startup_folder))\n"...
[ "def __init__(self, services_factory, portal=None, disclaimer_banner=None):...\n", "BaseResource.__init__(self, services_factory)\n", "self._static_folder = _get_static_folder()\n", "self._startup_folder = _get_startup_folder()\n", "self._portal = portal\n", "self._disclaimer_banner = disclaimer_banner\n"...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_0(self, VAR_3, VAR_4=True):...\n", "def FUNC_21(VAR_16):...\n", "return (VAR_16.input, VAR_16.dynamic_input) if VAR_4 else (VAR_16.output,\n VAR_16.dynamic_output)\n" ]
[ "def dynamic_branch(self, wildcards, input=True):...\n", "def get_io(rule):...\n", "return (rule.input, rule.dynamic_input) if input else (rule.output, rule.\n dynamic_output)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def FUNC_27(self):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_45(VAR_25):...\n", "if VAR_25.fieldtype == 'Table':\n", "return '{}: {}: {}'.format(_('Error'), _('Data missing in table'), _(VAR_25\n .label))\n", "if self.parentfield:\n", "return '{}: {} {} #{}: {}: {}'.format(_('Error'), VAR_54.bold(...
[ "def _get_missing_mandatory_fields(self):...\n", "\"\"\"docstring\"\"\"\n", "def get_msg(df):...\n", "if df.fieldtype == 'Table':\n", "return '{}: {}: {}'.format(_('Error'), _('Data missing in table'), _(df.label))\n", "if self.parentfield:\n", "return '{}: {} {} #{}: {}: {}'.format(_('Error'), frappe.b...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_4(self):...\n", "self.layout.addWidget(self.log_area)\n" ]
[ "def setup_log_window(self):...\n", "self.layout.addWidget(self.log_area)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self, VAR_0, VAR_1):...\n", "super(CLASS_0, self).__init__(VAR_0)\n", "self.values = VAR_1\n", "self.on_conflict = self.model_class._meta.on_conflict\n", "self.return_id = self.model_class._meta.primary_key\n" ]
[ "def __init__(self, model_class, values):...\n", "super(InsertQuery, self).__init__(model_class)\n", "self.values = values\n", "self.on_conflict = self.model_class._meta.on_conflict\n", "self.return_id = self.model_class._meta.primary_key\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "import zmq\n", "import threading, multiprocessing\n", "import logging\n", "from sup.ticker import Ticker\n", "import wzrpc\n", "from wzrpc.wzhandler import WZHandler\n", "import wzauth_data\n", "\"\"\"Exception to raise when self.running is cleared\"\"\"\n", "def __init__(self):...\n", "super()._...
[ "import zmq\n", "import threading, multiprocessing\n", "import logging\n", "from sup.ticker import Ticker\n", "import wzrpc\n", "from wzrpc.wzhandler import WZHandler\n", "import wzauth_data\n", "\"\"\"Exception to raise when self.running is cleared\"\"\"\n", "def __init__(self):...\n", "super()._...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 7, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "Import'", "Expr'", "FunctionDef'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'"...
[ "def FUNC_4(self, VAR_16, VAR_17):...\n", "\"\"\"docstring\"\"\"\n", "VAR_53 = {}\n", "for VAR_14 in VAR_16:\n", "if not (VAR_14.code and VAR_14.code.strip()):\n", "VAR_54 = 0\n", "if not (VAR_14.type == 'normal' or VAR_14.type == 'view' and VAR_14.\n", "while True:\n", "VAR_53[VAR_14.code] = VAR_17...
[ "def compute_view_items(self, items, items_values):...\n", "\"\"\"docstring\"\"\"\n", "value_dict = {}\n", "for item in items:\n", "if not (item.code and item.code.strip()):\n", "previous_error_counter = 0\n", "if not (item.type == 'normal' or item.type == 'view' and item.calculation and\n", "while Tr...
[ 0, 0, 0, 0, 0, 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'", "For", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "For", "Condition", "Condition", "Condition", "Assign'", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "AugAssign'", ...
[ "@integration_synonym_api...\n", "FUNC_2(VAR_2)\n", "FUNC_3(VAR_2, 'GOLDSTREAM ELECTRICAL LTD')\n", "FUNC_5(VAR_4, VAR_5, VAR_11='GOLDSMITHS', VAR_10=[{'name': '----GOLDSMITHS'\n }, {'name': 'GOLDSTREAM ELECTRICAL LTD'}])\n" ]
[ "@integration_synonym_api...\n", "clean_database(solr)\n", "seed_database_with(solr, 'GOLDSTREAM ELECTRICAL LTD')\n", "verify_results(client, jwt, query='GOLDSMITHS', expected=[{'name':\n '----GOLDSMITHS'}, {'name': 'GOLDSTREAM ELECTRICAL LTD'}])\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_4(VAR_3):...\n", "if not VAR_3:\n", "return errors.BAD_USERNAME_CHARS\n", "if len(VAR_3) < 3:\n", "return errors.BAD_USERNAME_SHORT\n", "if len(VAR_3) > 20:\n", "return errors.BAD_USERNAME_LONG\n", "return errors.BAD_USERNAME_CHARS\n" ]
[ "def whyuserbad(x):...\n", "if not x:\n", "return errors.BAD_USERNAME_CHARS\n", "if len(x) < 3:\n", "return errors.BAD_USERNAME_SHORT\n", "if len(x) > 20:\n", "return errors.BAD_USERNAME_LONG\n", "return errors.BAD_USERNAME_CHARS\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "if VAR_0 is None:\n", "return True\n", "return shutil.which(VAR_0) is not None\n" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "if executable is None:\n", "return True\n", "return shutil.which(executable) is not None\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Return'", "Return'" ]
[ "def FUNC_7(self, VAR_14):...\n", "" ]
[ "def is_image(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe import _\n", "from erpnext.hr.doctype.leave_application.leave_application import get_leave_allocation_records, get_leave_balance_on, get_approved_leaves_for_period\n", "def FUNC_0(VAR_0=None):...\n", "VAR_1 = frappe.db.sql_list('...
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe import _\n", "from erpnext.hr.doctype.leave_application.leave_application import get_leave_allocation_records, get_leave_balance_on, get_approved_leaves_for_period\n", "def execute(filters=None):...\n", "leave_types = frappe.db.s...
[ 0, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(self):...\n", "self.assertTrue(self.client.login(username='autotest', password='password'))\n" ]
[ "def setUp(self):...\n", "self.assertTrue(self.client.login(username='autotest', password='password'))\n" ]
[ 0, 5 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_23(self, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "return cryptolib.load_x509_certificate_pem_as_bare_base64(VAR_6)\n" ]
[ "def _load_x509_for_saml(self, path):...\n", "\"\"\"docstring\"\"\"\n", "return cryptolib.load_x509_certificate_pem_as_bare_base64(path)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "import json\n", "import os\n", "import stat\n", "import tempfile\n", "from django.conf import settings\n", "def FUNC_0(VAR_0, VAR_1, VAR_2):...\n", "VAR_1['AWS_ACCESS_KEY_ID'] = VAR_0.get_input('username', default='')\n", "VAR_1['AWS_SECRET_ACCESS_KEY'] = VAR_0.get_input('password', default='')\n", ...
[ "import json\n", "import os\n", "import stat\n", "import tempfile\n", "from django.conf import settings\n", "def aws(cred, env, private_data_dir):...\n", "env['AWS_ACCESS_KEY_ID'] = cred.get_input('username', default='')\n", "env['AWS_SECRET_ACCESS_KEY'] = cred.get_input('password', default='')\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "FunctionDef'", "A...
[ "def FUNC_1(self):...\n", "return 'check the main page'\n" ]
[ "def describe(self):...\n", "return 'check the main page'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_14(self):...\n", "self.run_test_case(self.scenario.disable_server_group())\n" ]
[ "def test_e_disable_server_group(self):...\n", "self.run_test_case(self.scenario.disable_server_group())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self, VAR_6, VAR_8, VAR_9, VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "self.name = VAR_6\n", "self.columns = VAR_8\n", "self.type = VAR_8[0].type\n", "self.column_selects = []\n", "for VAR_29 in VAR_8:\n", "self.column_selects.append(VAR_29.select())\n", "self.filter_string = None\n", ...
[ "def __init__(self, name, columns, filter_func, display_name):...\n", "\"\"\"docstring\"\"\"\n", "self.name = name\n", "self.columns = columns\n", "self.type = columns[0].type\n", "self.column_selects = []\n", "for c in columns:\n", "self.column_selects.append(c.select())\n", "self.filter_string = N...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_21(self, VAR_9=True):...\n", "\"\"\"docstring\"\"\"\n", "self._kill_process_type(VAR_13.PROCESS_TYPE_RAYLET_MONITOR, VAR_9=check_alive)\n" ]
[ "def kill_raylet_monitor(self, check_alive=True):...\n", "\"\"\"docstring\"\"\"\n", "self._kill_process_type(ray_constants.PROCESS_TYPE_RAYLET_MONITOR,\n check_alive=check_alive)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_4(self):...\n", "self.expected_requests([('http://localhost/swarming/api/v1/bot/handshake',\n {'data': {'attributes': 'b'}, 'headers': {'X-XSRF-Token-Request': '1'}},\n {'expiration_sec': 100, 'ignored': True, 'xsrf_token': 'token'}), (\n 'http://localhost/a', {'data': {'foo': 'bar'}, 'headers'...
[ "def testXsrfRemoteCustom(self):...\n", "self.expected_requests([('http://localhost/swarming/api/v1/bot/handshake',\n {'data': {'attributes': 'b'}, 'headers': {'X-XSRF-Token-Request': '1'}},\n {'expiration_sec': 100, 'ignored': True, 'xsrf_token': 'token'}), (\n 'http://localhost/a', {'data': {'foo': 'ba...
[ 0, 5, 5, 5, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_8(self, VAR_12=False):...\n", "VAR_86 = self.rules\n", "if VAR_12:\n", "VAR_86 = filterfalse(Rule.has_wildcards, VAR_86)\n", "for VAR_13 in VAR_86:\n", "logger.rule_info(VAR_10=rule.name, docstring=rule.docstring)\n" ]
[ "def list_rules(self, only_targets=False):...\n", "rules = self.rules\n", "if only_targets:\n", "rules = filterfalse(Rule.has_wildcards, rules)\n", "for rule in rules:\n", "logger.rule_info(name=rule.name, docstring=rule.docstring)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "For", "Docstring" ]
[ "@staticmethod...\n", "return ' '.join(escape_path_argument(s) for s in (sys.executable, os.path.\n join(os.path.dirname(os.path.realpath(__file__)),\n 'run_shell_command_testfiles', VAR_0)))\n" ]
[ "@staticmethod...\n", "return ' '.join(escape_path_argument(s) for s in (sys.executable, os.path.\n join(os.path.dirname(os.path.realpath(__file__)),\n 'run_shell_command_testfiles', scriptname)))\n" ]
[ 0, 2 ]
[ "Condition", "Return'" ]
[ "def FUNC_6(self):...\n", "VAR_21 = pyodbc.drivers()\n", "self.assertTrue(isinstance(VAR_21, list))\n" ]
[ "def test_drivers(self):...\n", "p = pyodbc.drivers()\n", "self.assertTrue(isinstance(p, list))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def __exit__(self, VAR_0, VAR_1, VAR_2):...\n", "if self.conn:\n", "self.cur.close()\n", "self.conn.close()\n" ]
[ "def __exit__(self, exc_type, exc_val, exc_tb):...\n", "if self.conn:\n", "self.cur.close()\n", "self.conn.close()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(self.fields, string_types):\n", "if self.fields == '*':\n", "for filter_name in ['filters', 'or_filters']:\n", "self.fields = ['*']\n", "self.fields = json.loads(self.fields)\n", "self.fields = [VAR_34.strip() for VAR_34 in self.field...
[ "def parse_args(self):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(self.fields, string_types):\n", "if self.fields == '*':\n", "for filter_name in ['filters', 'or_filters']:\n", "self.fields = ['*']\n", "self.fields = json.loads(self.fields)\n", "self.fields = [f.strip() for f in self.fields.spli...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "For", "Expr'" ]
[ "def FUNC_29(self):...\n", "VAR_49 = re.split(self.dynamic_fill, self.file)[0]\n", "VAR_50 = os.path.dirname(VAR_49)\n", "if len(VAR_50) > 0 and not os.path.exists(VAR_50):\n", "os.makedirs(VAR_50)\n", "if e.errno != 17:\n" ]
[ "def prepare(self):...\n", "path_until_wildcard = re.split(self.dynamic_fill, self.file)[0]\n", "dir = os.path.dirname(path_until_wildcard)\n", "if len(dir) > 0 and not os.path.exists(dir):\n", "os.makedirs(dir)\n", "if e.errno != 17:\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Condition" ]
[ "def FUNC_15(self):...\n", "self._omnicomp.OnFileReadyToParse(None)\n", "if not self._IsServerAlive():\n", "self._NotifyUserIfServerCrashed()\n", "VAR_5 = {}\n", "self._AddTagsFilesIfNeeded(VAR_5)\n", "self._AddSyntaxDataIfNeeded(VAR_5)\n", "self._AddExtraConfDataIfNeeded(VAR_5)\n", "self._latest_fi...
[ "def OnFileReadyToParse(self):...\n", "self._omnicomp.OnFileReadyToParse(None)\n", "if not self._IsServerAlive():\n", "self._NotifyUserIfServerCrashed()\n", "extra_data = {}\n", "self._AddTagsFilesIfNeeded(extra_data)\n", "self._AddSyntaxDataIfNeeded(extra_data)\n", "self._AddExtraConfDataIfNeeded(ext...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@eqlx.with_timeout...\n", "return 'no timeout'\n" ]
[ "@eqlx.with_timeout...\n", "return 'no timeout'\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@VAR_0.assignment_tag(takes_context=True)...\n", "VAR_16 = FUNC_1(VAR_1)\n", "return VAR_16.total()['min_group_size']\n" ]
[ "@register.assignment_tag(takes_context=True)...\n", "points = _prepare_context(context)\n", "return points.total()['min_group_size']\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def __init__(self, VAR_9, *, VAR_10=0, VAR_11=2):...\n", "self.wires = VAR_9\n", "self.hbar = VAR_11\n", "self.eng = None\n", "self.state = None\n", "super().__init__(self.short_name, VAR_10)\n" ]
[ "def __init__(self, wires, *, shots=0, hbar=2):...\n", "self.wires = wires\n", "self.hbar = hbar\n", "self.eng = None\n", "self.state = None\n", "super().__init__(self.short_name, shots)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_0):...\n", "self.config = VAR_0\n", "self.db = sqlite3.connect(self.config.get_database_path(),\n check_same_thread=False)\n", "self.c = self.db.cursor()\n" ]
[ "def __init__(self, config):...\n", "self.config = config\n", "self.db = sqlite3.connect(self.config.get_database_path(),\n check_same_thread=False)\n", "self.c = self.db.cursor()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(VAR_7=None, VAR_8=0, VAR_9=0):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_7 is None:\n", "return True\n", "return False\n", "VAR_21 = re.match('^([^;]+)(; length=([0-9]+))?$', VAR_7, re.IGNORECASE)\n", "VAR_22 = parse_http_date(VAR_21.group(1))\n", "VAR_23 = VAR_21.group(3)\n", "if VAR_23...
[ "def was_modified_since(header=None, mtime=0, size=0):...\n", "\"\"\"docstring\"\"\"\n", "if header is None:\n", "return True\n", "return False\n", "matches = re.match('^([^;]+)(; length=([0-9]+))?$', header, re.IGNORECASE)\n", "header_mtime = parse_http_date(matches.group(1))\n", "header_len = matche...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'", "Assign'", "Assign'", "Assign'", "Condition", "Condition" ]
[ "def FUNC_5(VAR_8, VAR_9):...\n", "return dict(point=bounds, line=bounds, polygon=bounds)\n" ]
[ "def _bounds_pad_no_buf(bounds, meters_per_pixel_dim):...\n", "return dict(point=bounds, line=bounds, polygon=bounds)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __str__(self):...\n", "return ' '.join(map(str, self))\n" ]
[ "def __str__(self):...\n", "return ' '.join(map(str, self))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self, VAR_6=None, VAR_7='', VAR_8='', VAR_9=None, VAR_10=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = self.session.query(self.obj)\n", "if len(VAR_7.split('.')) >= 2:\n", "VAR_33 = ''\n", "VAR_23 = self.session.query(func.count('*')).select_from(self.obj)\n", "for join_relation in VAR_7...
[ "def query(self, filters=None, order_column='', order_direction='', page=...\n", "\"\"\"docstring\"\"\"\n", "query = self.session.query(self.obj)\n", "if len(order_column.split('.')) >= 2:\n", "tmp_order_column = ''\n", "query_count = self.session.query(func.count('*')).select_from(self.obj)\n", "for jo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "@Throttle(VAR_4)...\n", "\"\"\"docstring\"\"\"\n", "import pyatmo\n", "self.station_data = pyatmo.WeatherStationData(self.auth)\n", "if self.station is not None:\n", "self.data = self.station_data.lastData(VAR_19=self.station, exclude=3600)\n", "self.data = self.station_data.lastData(exclude=3600)\n" ]
[ "@Throttle(MIN_TIME_BETWEEN_UPDATES)...\n", "\"\"\"docstring\"\"\"\n", "import pyatmo\n", "self.station_data = pyatmo.WeatherStationData(self.auth)\n", "if self.station is not None:\n", "self.data = self.station_data.lastData(station=self.station, exclude=3600)\n", "self.data = self.station_data.lastDat...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Import'", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_1(self):...\n", "self.render('signup.html', VAR_6='')\n" ]
[ "def get(self):...\n", "self.render('signup.html', error='')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "from django.test import TestCase\n", "from django.utils import timezone\n", "from django.contrib.auth.models import User\n", "from django.core.exceptions import ValidationError\n", "from dashboard.tests.loader import load_model_objects\n", "from dashboard.models import ExtractedText, QANotes\n", "def F...
[ "from django.test import TestCase\n", "from django.utils import timezone\n", "from django.contrib.auth.models import User\n", "from django.core.exceptions import ValidationError\n", "from dashboard.tests.loader import load_model_objects\n", "from dashboard.models import ExtractedText, QANotes\n", "def s...
[ 0, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Func...
[ "def FUNC_18(self, VAR_16, VAR_17=None, VAR_18=None, **VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "VAR_38 = registration.get_mapping(self.__class__, VAR_16)\n", "VAR_18 = VAR_18 or []\n", "VAR_18.extend(VAR_38.exclude_fields)\n", "self.full_clean(VAR_18)\n", "return VAR_38(self, VAR_17).convert(**field_...
[ "def convert_to(self, to_resource, context=None, ignore_fields=None, **...\n", "\"\"\"docstring\"\"\"\n", "mapping = registration.get_mapping(self.__class__, to_resource)\n", "ignore_fields = ignore_fields or []\n", "ignore_fields.extend(mapping.exclude_fields)\n", "self.full_clean(ignore_fields)\n", "r...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "\"\"\"string\"\"\"\n", "import sys\n", "from hp3parclient import exceptions as hpexceptions\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder import utils\n", "import cinder.volume.driver\n", "from cinder.volume.drivers.san.hp import hp_3par_co...
[ "\"\"\"\nVolume driver for HP 3PAR Storage array.\nThis driver requires 3.1.2 MU2 firmware on the 3PAR array.\n\nYou will need to install the python hp3parclient.\nsudo pip install hp3parclient\n\nSet the following in the cinder.conf file to enable the\n3PAR iSCSI Driver along with the required flags:\n\nvolume_dri...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Return'" ]
[ "@wraps(VAR_7)...\n", "if VAR_12:\n", "return VAR_7(VAR_8[0], VAR_1, *VAR_8[1:], **kwargs)\n", "return VAR_7(VAR_1, *VAR_8, **kwargs)\n" ]
[ "@wraps(f)...\n", "if with_response:\n", "return f(args[0], remote, *args[1:], **kwargs)\n", "return f(remote, *args, **kwargs)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "import os.path\n", "from django.test import TestCase\n", "from django.conf import settings\n", "from api.models import App\n", "\"\"\"Te...
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "import os.path\n", "from django.test import TestCase\n", "from django.conf import settings\n", "from api.models import App\n", "\"\"\"Te...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 5, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "FunctionDef'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", ...
[ "from django.utils.translation import string_concat, ugettext_lazy as _\n", "from django.utils.text import format_lazy\n", "from django.utils.functional import lazy as _lazy\n", "from lib.helpers import Enum\n", "def FUNC_6(VAR_12, *VAR_13, **VAR_14):...\n", "\"\"\"string\"\"\"\n", "return VAR_12.format...
[ "from django.utils.translation import string_concat, ugettext_lazy as _\n", "from django.utils.text import format_lazy\n", "from django.utils.functional import lazy as _lazy\n", "from lib.helpers import Enum\n", "def _format_lazy(format_string, *args, **kwargs):...\n", "\"\"\"\nBase permission classes.\n\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Expr'", "Return'", "Assign'", "Expr'", "FunctionDef'", "Docstring", "FunctionDef'", "Return'" ]
[ "def FUNC_8(self):...\n", "VAR_3 = DatabaseQuery('DocField').execute(filters={'parent': 'DocType'},\n fields=['fieldname', 'fieldtype'], or_filters=[{'fieldtype': 'Table'},\n {'fieldtype': 'Select'}])\n", "self.assertTrue({'fieldtype': 'Table', 'fieldname': 'fields'} in VAR_3)\n", "self.assertTrue({'fie...
[ "def test_or_filters(self):...\n", "data = DatabaseQuery('DocField').execute(filters={'parent': 'DocType'},\n fields=['fieldname', 'fieldtype'], or_filters=[{'fieldtype': 'Table'},\n {'fieldtype': 'Select'}])\n", "self.assertTrue({'fieldtype': 'Table', 'fieldname': 'fields'} in data)\n", "self.assertTru...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_12(self, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "shellutil.run('> /var/run/utmp')\n", "shellutil.run('/usr/bin/tmsh delete auth user ' + VAR_1)\n" ]
[ "def del_account(self, username):...\n", "\"\"\"docstring\"\"\"\n", "shellutil.run('> /var/run/utmp')\n", "shellutil.run('/usr/bin/tmsh delete auth user ' + username)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(n int)')\n", "self.cursor.execute('insert into t1 values (?)', 1)\n", "self.cursor.execute('insert into t1 values (?)', 2)\n", "self.cursor.execute('insert into t1 values (?)', 3)\n", "for i in range(3):\n", "se...
[ "def test_multiple_bindings(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(n int)')\n", "self.cursor.execute('insert into t1 values (?)', 1)\n", "self.cursor.execute('insert into t1 values (?)', 2)\n", "self.cursor.execute('insert into t1 values (?)', 3)\n", "for i in ran...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Expr'", "For", "Expr'", "Expr'" ]
[ "@app.route('/api/server/devices/<device>/properties/<property_name>',...\n", "app.logger.debug('update property: {}/{} ({})'.format(VAR_6, VAR_7, VAR_3))\n", "VAR_18 = controller.indi_server.property(VAR_6=device, VAR_5=property_name)\n", "return {'action': 'set_property', 'device': VAR_6, 'property': VAR_7,...
[ "@app.route('/api/server/devices/<device>/properties/<property_name>',...\n", "app.logger.debug('update property: {}/{} ({})'.format(device, property_name,\n json))\n", "indi_property = controller.indi_server.property(device=device, name=\n property_name)\n", "return {'action': 'set_property', 'device':...
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_4(VAR_5, VAR_7):...\n", "VAR_13 = lambda : None\n", "if VAR_7.secure_cookie_salt:\n", "set_secure_cookie_salt(VAR_7.secure_cookie_salt)\n", "set_inline_static_files_directory(VEIL_VAR_DIR / 'inline-static-files')\n", "set_external_static_files_directory(VEIL_HOME / 'static')\n", "VAR_14 = VAR_...
[ "def create_website_http_handler(purpose, config):...\n", "locale_provider = lambda : None\n", "if config.secure_cookie_salt:\n", "set_secure_cookie_salt(config.secure_cookie_salt)\n", "set_inline_static_files_directory(VEIL_VAR_DIR / 'inline-static-files')\n", "set_external_static_files_directory(VEIL_HO...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_5():...\n", "VAR_2 = FUNC_0()\n", "print('##################################')\n", "print('# retail application #')\n", "print('##################################')\n", "VAR_1 = FUNC_4(VAR_2)\n", "print(\"\"\"\n type 'help' for query info\"\"\")\n", "print(\" enter 'quit'...
[ "def main():...\n", "query = init()\n", "print('##################################')\n", "print('# retail application #')\n", "print('##################################')\n", "id = get_customer_id(query)\n", "print(\"\"\"\n type 'help' for query info\"\"\")\n", "print(\" enter 'qui...
[ 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "def __init__(self):...\n", "self.content = VAR_2\n" ]
[ "def __init__(self):...\n", "self.content = content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "def __eq__(self, VAR_35):...\n", "return self.__class__ == VAR_35.__class__ and self.nested_columns == VAR_35.nested_columns\n" ]
[ "def __eq__(self, other):...\n", "return self.__class__ == other.__class__ and self.nested_columns == other.nested_columns\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@click.group()...\n", "VAR_29 = os.path.expanduser('~/.config/neres/{}.cookies'.format(VAR_21))\n", "if not os.path.exists(os.path.dirname(VAR_29)):\n", "os.makedirs(os.path.dirname(VAR_29), 448)\n", "newrelic.initialize_cookiejar(VAR_29)\n", "if VAR_0.invoked_subcommand != 'login':\n", "if all([VAR_5,...
[ "@click.group()...\n", "cookiejar = os.path.expanduser('~/.config/neres/{}.cookies'.format(environment)\n )\n", "if not os.path.exists(os.path.dirname(cookiejar)):\n", "os.makedirs(os.path.dirname(cookiejar), 448)\n", "newrelic.initialize_cookiejar(cookiejar)\n", "if ctx.invoked_subcommand != 'login':\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Expr'", "Condition", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_6(self, VAR_16):...\n", "for line in filter(lambda error: bool(error.strip()), VAR_16):\n", "self.warn(line)\n" ]
[ "def _print_errors(self, errors):...\n", "for line in filter(lambda error: bool(error.strip()), errors):\n", "self.warn(line)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "@tornado.web.asynchronous...\n", "VAR_6 = tornado.concurrent.Future()\n", "def FUNC_4(VAR_2):...\n", "VAR_7 = files.get_static_data('./static/files.html')\n", "VAR_2 = FUNC_1(VAR_2)\n", "VAR_2 = '/'\n", "if not VAR_2:\n", "VAR_2 = '/'\n", "VAR_14 = VAR_2.split('/')\n", "VAR_15 = list()\n", "whi...
[ "@tornado.web.asynchronous...\n", "future = tornado.concurrent.Future()\n", "def get_final_html_async(target_path):...\n", "file_temp = files.get_static_data('./static/files.html')\n", "target_path = decode_hexed_b64_to_str(target_path)\n", "target_path = '/'\n", "if not target_path:\n", "target_path ...
[ 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, 4, 0, 4, 0, 4, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "For", "AugAssign'", "Assign'", "AugAssign'", "For", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", ...
[ "def __init__(self, VAR_8):...\n", "self.spdx = VAR_8\n", "self.lasttok = None\n", "self.lastid = None\n", "self.lexer = lex.lex(module=self, reflags=re.UNICODE)\n", "self.parser = yacc.yacc(module=self, write_tables=False, debug=False)\n", "self.lines_checked = 0\n", "self.checked = 0\n", "self.spd...
[ "def __init__(self, spdx):...\n", "self.spdx = spdx\n", "self.lasttok = None\n", "self.lastid = None\n", "self.lexer = lex.lex(module=self, reflags=re.UNICODE)\n", "self.parser = yacc.yacc(module=self, write_tables=False, debug=False)\n", "self.lines_checked = 0\n", "self.checked = 0\n", "self.spdx_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_10(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_24 = False\n", "self.connect()\n", "self.close()\n", "VAR_24 = True\n", "return VAR_24\n" ]
[ "def _is_app_running(self):...\n", "\"\"\"docstring\"\"\"\n", "running = False\n", "self.connect()\n", "self.close()\n", "running = True\n", "return running\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_11(self, VAR_7=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_18 = set()\n", "if self.benchmark and (VAR_7 is None or self.benchmark in VAR_7):\n", "if not self.benchmark.exists:\n", "for VAR_28, VAR_27 in zip(self.output, self.rule.output):\n", "VAR_18.add(self.benchmark)\n", "if VAR_7 is No...
[ "def missing_output(self, requested=None):...\n", "\"\"\"docstring\"\"\"\n", "files = set()\n", "if self.benchmark and (requested is None or self.benchmark in requested):\n", "if not self.benchmark.exists:\n", "for f, f_ in zip(self.output, self.rule.output):\n", "files.add(self.benchmark)\n", "if req...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "For", "Expr'", "Condition", "Return'", "Condition", "Condition", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_14(self, VAR_8={}):...\n", "\"\"\"docstring\"\"\"\n", "VAR_24 = self._do_search_default_automaton()\n", "if not self.crapo_state:\n", "if not VAR_24:\n", "return False\n", "if 'name' not in VAR_8:\n", "VAR_8['name'] = 'Default State for %s' % self.id\n", "VAR_8['automaton'] = VAR_24.id\n",...
[ "def _compute_related_state(self, values={}):...\n", "\"\"\"docstring\"\"\"\n", "my_automaton = self._do_search_default_automaton()\n", "if not self.crapo_state:\n", "if not my_automaton:\n", "return False\n", "if 'name' not in values:\n", "values['name'] = 'Default State for %s' % self.id\n", "valu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = self.parts\n", "VAR_13 = 0\n", "while VAR_13 < len(VAR_12):\n", "if VAR_12[VAR_13] == '.' or VAR_12[VAR_13] == '':\n", "if not VAR_12:\n", "VAR_12.pop(VAR_13)\n", "if VAR_13 < 1 or VAR_12[VAR_13] != '..' or VAR_12[VAR_13 - 1] == '..':\n"...
[ "def canonicalize(self):...\n", "\"\"\"docstring\"\"\"\n", "parts = self.parts\n", "i = 0\n", "while i < len(parts):\n", "if parts[i] == '.' or parts[i] == '':\n", "if not parts:\n", "parts.pop(i)\n", "if i < 1 or parts[i] != '..' or parts[i - 1] == '..':\n", "self.trailing_slash = False\n", "re...
[ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Expr'", "Condition", "Assign'", "Return'", "AugAssign'", "AugAssign'", "Expr'", "Expr'" ]
[ "def FUNC_1(VAR_0, VAR_1, VAR_3=False, **VAR_2):...\n", "if VAR_3:\n", "CLASS_0.invalidate(VAR_1.user)\n", "for VAR_7 in VAR_1.assistants.all():\n", "CLASS_0.invalidate(VAR_7.user)\n" ]
[ "def invalidate_assistants(sender, instance, reverse=False, **kwargs):...\n", "if reverse:\n", "CachedTopMenu.invalidate(instance.user)\n", "for profile in instance.assistants.all():\n", "CachedTopMenu.invalidate(profile.user)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "For", "Expr'" ]