lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_1(VAR_0, VAR_1):...\n", "" ]
[ "def delete_attribute(table_name, column):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_3(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "FUNC_1(VAR_0)\n", "os.chdir(VAR_0.folderName)\n", "FUNC_4(VAR_0)\n" ]
[ "def post_folder(args):...\n", "\"\"\"docstring\"\"\"\n", "get_folder_data(args)\n", "os.chdir(args.folderName)\n", "post_ad(args)\n" ]
[ 0, 0, 0, 5, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'" ]
[ "def __init__(self):...\n", "self.authomatic_config = {'google': {'class_': oauth2.Google,\n 'consumer_key': app.config['GOOGLE_OAUTH_CLIENT_ID'], 'consumer_secret':\n app.config['GOOGLE_OAUTH_CONSUMER_SECRET'], 'scope': ['profile', 'email']}}\n", "self.authomatic = Authomatic(self.authomatic_config, app....
[ "def __init__(self):...\n", "self.authomatic_config = {'google': {'class_': oauth2.Google,\n 'consumer_key': app.config['GOOGLE_OAUTH_CLIENT_ID'], 'consumer_secret':\n app.config['GOOGLE_OAUTH_CONSUMER_SECRET'], 'scope': ['profile', 'email']}}\n", "self.authomatic = Authomatic(self.authomatic_config, app....
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "@staticmethod...\n", "def FUNC_14(VAR_7):...\n", "def FUNC_13(self, *VAR_16, **VAR_10):...\n", "if not self.is_group_user(VAR_8):\n", "return VAR_7(self, *VAR_16, **kwargs)\n" ]
[ "@staticmethod...\n", "def decorator(method):...\n", "def wrapper(self, *args, **kwargs):...\n", "if not self.is_group_user(group):\n", "return method(self, *args, **kwargs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "FunctionDef'", "Condition", "Return'" ]
[ "def FUNC_6(self, VAR_21):...\n", "if VAR_21:\n", "VAR_106 = int(VAR_21, 36)\n", "if self.redirect:\n", "return Link._byID(VAR_106, True)\n", "abort(404, 'page not found')\n", "return None\n" ]
[ "def run(self, link_id):...\n", "if link_id:\n", "aid = int(link_id, 36)\n", "if self.redirect:\n", "return Link._byID(aid, True)\n", "abort(404, 'page not found')\n", "return None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Return'", "Expr'", "Return'" ]
[ "def FUNC_17(VAR_16):...\n", "return VAR_19(VAR_16, 'touch')\n" ]
[ "def touch(value):...\n", "return flag(value, 'touch')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_18(self):...\n", "VAR_26 = []\n", "def FUNC_25(VAR_14, VAR_27, VAR_28):...\n", "VAR_26.append((VAR_14, VAR_27.splitlines()[0], VAR_28))\n", "self.mock(bot_main, 'post_error_task', FUNC_25)\n", "def FUNC_24(VAR_25, VAR_23, *VAR_24):...\n", "if VAR_23 == 'on_after_task':\n", "VAR_50, VAR_51, V...
[ "def test_run_manifest_exception(self):...\n", "posted = []\n", "def post_error_task(botobj, msg, task_id):...\n", "posted.append((botobj, msg.splitlines()[0], task_id))\n", "self.mock(bot_main, 'post_error_task', post_error_task)\n", "def call_hook(_botobj, name, *args):...\n", "if name == 'on_after_ta...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "FunctionDef'", "Expr'", "Expr'", "FunctionDef'", "Condition", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_0(self):...\n", "self.win = Toplevel()\n", "self.win.title = 'Input JIRA Login'\n", "self.username_static_text = Label(self.win, text='Username:')\n", "self.username_static_text.grid(column=0, row=0, sticky='E')\n", "self.username_field = Entry(self.win)\n", "self.username_field.configure(back...
[ "def setCredentials(self):...\n", "self.win = Toplevel()\n", "self.win.title = 'Input JIRA Login'\n", "self.username_static_text = Label(self.win, text='Username:')\n", "self.username_static_text.grid(column=0, row=0, sticky='E')\n", "self.username_field = Entry(self.win)\n", "self.username_field.config...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "\"\"\"string\"\"\"\n", "from lxml import etree\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder.volume.drivers.san.san import SanISCSIDriver\n", "VAR_0 = logging.getLogger(__name__)\n", "\"\"\"string\"\"\"\n", "VAR_1 = {}\n", "def __init__(s...
[ "\"\"\"\nHP Lefthand SAN ISCSI Driver.\n\nThe driver communicates to the backend aka Cliq via SSH to perform all the\noperations on the SAN.\n\"\"\"\n", "from lxml import etree\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder.volume.drivers.san.san i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Expr'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "For", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_3(self, VAR_9):...\n", "VAR_23 = super().get_transform(VAR_9)\n", "if VAR_23:\n", "return VAR_23\n", "return CLASS_13(VAR_9)\n" ]
[ "def get_transform(self, name):...\n", "transform = super().get_transform(name)\n", "if transform:\n", "return transform\n", "return KeyTransformFactory(name)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_2(VAR_4, VAR_5, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = [TranslationMemoryEntry(source=t.entity.string, target=t.string,\n VAR_2=locale, entity=t.entity, translation=t, VAR_5=project) for t in\n Translation.objects.filter(pk__in=changed_translation_pks).\n prefetch_related('entity...
[ "def update_translation_memory(changed_translation_pks, project, locale):...\n", "\"\"\"docstring\"\"\"\n", "memory_entries = [TranslationMemoryEntry(source=t.entity.string, target=t.\n string, locale=locale, entity=t.entity, translation=t, project=project) for\n t in Translation.objects.filter(pk__in=cha...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_3(VAR_1, VAR_2, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7):...\n", "VAR_11, VAR_10 = FUNC_1()\n", "VAR_12 = FUNC_0()\n", "VAR_11.execute(\"INSERT INTO npc VALUES ('\" + VAR_12 + \"','\" + str(VAR_1) +\n \"','\" + VAR_2 + \"','\" + VAR_3 + \"','\" + VAR_4 + \"','\" + str(VAR_5) +\n \"','\" + VAR_6 + \"...
[ "def insertNPC(name, race, classe, sex, level, image, legit):...\n", "c, conn = getConnection()\n", "date = now()\n", "c.execute(\"INSERT INTO npc VALUES ('\" + date + \"','\" + str(name) + \"','\" +\n race + \"','\" + classe + \"','\" + sex + \"','\" + str(level) + \"','\" +\n image + \"','\" + str(leg...
[ 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self):...\n", "if self._IsServerAlive():\n", "self._server_popen.terminate()\n", "utils.RemoveIfExists(self._temp_options_filename)\n" ]
[ "def _ServerCleanup(self):...\n", "if self._IsServerAlive():\n", "self._server_popen.terminate()\n", "utils.RemoveIfExists(self._temp_options_filename)\n" ]
[ 0, 0, 0, 7 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'" ]
[ "@tornado.gen.coroutine...\n", "VAR_17 = 'SELECT {} FROM users WHERE email = %s'.format(VAR_6)\n", "VAR_18 = VAR_15\n", "VAR_19 = yield VAR_1.execute(query=sql, VAR_18=params)\n", "return VAR_19.fetchone()\n" ]
[ "@tornado.gen.coroutine...\n", "sql = 'SELECT {} FROM users WHERE email = %s'.format(cols)\n", "params = email\n", "cursor = yield tx.execute(query=sql, params=params)\n", "return cursor.fetchone()\n" ]
[ 0, 0, 4, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_13(VAR_7, VAR_1, VAR_12=True):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(VAR_7, six.text_type):\n", "VAR_7 = import_string(VAR_7)\n", "@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" ]
[ "def make_handler(f, remote, with_response=True):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(f, six.text_type):\n", "f = import_string(f)\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, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_15(VAR_6):...\n", "VAR_4.register_jvm_tool(VAR_8, VAR_4._key_for_tool_version('scalastyle',\n VAR_6), VAR_15=[scala_style_jar])\n" ]
[ "def register_style_tool(version):...\n", "cls.register_jvm_tool(register, cls._key_for_tool_version('scalastyle',\n version), classpath=[scala_style_jar])\n" ]
[ 0, 7 ]
[ "FunctionDef'", "Expr'" ]
[ "@auth.require(acl.is_bot)...\n", "VAR_4, VAR_14, VAR_9, VAR_25, VAR_24, VAR_26 = self._process()\n", "VAR_37 = VAR_4.get('event')\n", "if VAR_37 not in ('bot_error', 'bot_rebooting', 'bot_shutdown'):\n", "self.abort_with_error(400, error='Unsupported event type')\n", "VAR_8 = VAR_4.get('message')\n", "...
[ "@auth.require(acl.is_bot)...\n", "request, bot_id, version, state, dimensions, quarantined_msg = self._process()\n", "event = request.get('event')\n", "if event not in ('bot_error', 'bot_rebooting', 'bot_shutdown'):\n", "self.abort_with_error(400, error='Unsupported event type')\n", "message = request.ge...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_6):...\n", "VAR_24 = self._get_net_info()\n", "if VAR_24[0] == VAR_6:\n", "return VAR_24[2].replace(':', '').upper()\n", "return None\n" ]
[ "def get_if_mac(self, ifname):...\n", "data = self._get_net_info()\n", "if data[0] == ifname:\n", "return data[2].replace(':', '').upper()\n", "return None\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "from cores.base_plugins import Scanner\n", "import re\n", "def FUNC_0(self):...\n", "from cores.xeger import Xeger\n", "VAR_4 = Xeger()\n", "while True:\n", "VAR_5 = VAR_4.xeger(\n \"\"\"((\\\\%3C)|<)((\\\\%69)|i|(\\\\%49))((\\\\%6D)|m|(\\\\%4D))((\\\\%67)|g|(\\\\%47))[^\n]+((\\\\%3E)|>)\"\"\"\n ...
[ "from cores.base_plugins import Scanner\n", "import re\n", "def gen_payload(self):...\n", "from cores.xeger import Xeger\n", "generate = Xeger()\n", "while True:\n", "_payload = generate.xeger(\n \"\"\"((\\\\%3C)|<)((\\\\%69)|i|(\\\\%49))((\\\\%6D)|m|(\\\\%4D))((\\\\%67)|g|(\\\\%47))[^\n]+((\\\\%3E)|...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "FunctionDef'", "ImportFrom'", "Assign'", "Condition", "Assign'", "For", "Return'" ]
[ "@VAR_0.route('/api/issue', methods=['PUT'])...\n", "VAR_10 = FUNC_1()\n", "VAR_5 = VAR_10.cursor()\n", "print(error)\n", "return 'Not implemented.', 501\n", "for VAR_7 in request.get_json().get('data', {}):\n", "return jsonify({'error': str(error)}), 500\n", "VAR_21 = FUNC_3(VAR_5, VAR_7.get('id', -1...
[ "@app.route('/api/issue', methods=['PUT'])...\n", "connection = get_database_connection()\n", "cursor = connection.cursor()\n", "print(error)\n", "return 'Not implemented.', 501\n", "for issue in request.get_json().get('data', {}):\n", "return jsonify({'error': str(error)}), 500\n", "fetched_issue = f...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Return'", "For", "Return'", "Assign'", "Condition", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Expr'" ]
[ "def FUNC_7(self):...\n", "VAR_21 = pyodbc.dataSources()\n", "self.assertTrue(isinstance(VAR_21, dict))\n" ]
[ "def test_datasources(self):...\n", "p = pyodbc.dataSources()\n", "self.assertTrue(isinstance(p, dict))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_7(self, *VAR_7, **VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "for VAR_9 in VAR_7:\n", "self._set_inoutput_item(VAR_9, VAR_7=True)\n", "for VAR_10, VAR_9 in VAR_8.items():\n", "self._set_inoutput_item(VAR_9, VAR_7=True, VAR_10=name)\n", "for VAR_9 in self.output:\n", "if self.dynamic_output an...
[ "def set_output(self, *output, **kwoutput):...\n", "\"\"\"docstring\"\"\"\n", "for item in output:\n", "self._set_inoutput_item(item, output=True)\n", "for name, item in kwoutput.items():\n", "self._set_inoutput_item(item, output=True, name=name)\n", "for item in self.output:\n", "if self.dynamic_outp...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Expr'", "For", "Expr'", "For", "Condition", "Assign'", "Condition", "Condition", "Assign'" ]
[ "\"\"\"\nModule contains functions and CVE class for returning data from DB\n\"\"\"\n", "\"\"\"\n Class to hold CVE attributes\n \"\"\"\n", "VAR_0 = None\n", "def __init__(self, VAR_1, VAR_2):...\n", "for col_name in VAR_2:\n", "setattr(self, col_name, VAR_1[VAR_2.index(col_name)])\n", "self.cwe =...
[ "\"\"\"\nModule contains functions and CVE class for returning data from DB\n\"\"\"\n", "\"\"\"\n Class to hold CVE attributes\n \"\"\"\n", "cve_cwe_map = None\n", "def __init__(self, cve_entry, column_names):...\n", "for col_name in column_names:\n", "setattr(self, col_name, cve_entry[column_names....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Expr'", "Assign'", "FunctionDef'", "For", "Expr'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def __hash__(self):...\n", "return hash(tuple(self))\n" ]
[ "def __hash__(self):...\n", "return hash(tuple(self))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@VAR_2.route('/big_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", "VAR_14 = request.args.get('scene', default=None)\n", "VAR_32 = not (VAR_5 == None and VAR_19 == None)\n", "if VAR_32:\n", "...
[ "@endpoints.route('/big_wins')...\n", "if db == None:\n", "init()\n", "tag = request.args.get('tag', default=None)\n", "date = request.args.get('date', default=None)\n", "scene = request.args.get('scene', default=None)\n", "valid = not (tag == None and date == None)\n", "if valid:\n", "select = 'sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'...
[ "def FUNC_10(VAR_7):...\n", "VAR_12 = urlparse(request.host_url)\n", "VAR_13 = urlparse(urljoin(request.host_url, VAR_7))\n", "return VAR_13.scheme in ('http', 'https') and VAR_12.netloc == VAR_13.netloc\n" ]
[ "def is_safe_url(target):...\n", "ref_url = urlparse(request.host_url)\n", "test_url = urlparse(urljoin(request.host_url, target))\n", "return test_url.scheme in ('http', 'https'\n ) and ref_url.netloc == test_url.netloc\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_12(self, VAR_10, VAR_12, **VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = {}\n", "VAR_5['volumeName'] = VAR_10['name']\n", "VAR_5['serverName'] = VAR_12['host']\n", "self._cliq_run_xml('unassignVolumeToServer', VAR_5)\n" ]
[ "def terminate_connection(self, volume, connector, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "cliq_args = {}\n", "cliq_args['volumeName'] = volume['name']\n", "cliq_args['serverName'] = connector['host']\n", "self._cliq_run_xml('unassignVolumeToServer', cliq_args)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_8():...\n", "VAR_0.create_table()\n", "VAR_19 = None\n", "while True:\n", "VAR_16 = FUNC_1(VAR_8, VAR_19)\n", "if VAR_16['result']:\n", "VAR_19 = FUNC_2(VAR_16) + 1\n", "time.sleep(1)\n", "FUNC_5(VAR_16, VAR_19)\n" ]
[ "def main():...\n", "db.create_table()\n", "latest_update_id = None\n", "while True:\n", "updates = get_updates(timeout_oth, latest_update_id)\n", "if updates['result']:\n", "latest_update_id = get_latest_update_id(updates) + 1\n", "time.sleep(1)\n", "handle_updates(updates, latest_update_id)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_0(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = 'string' % VAR_1\n", "VAR_3 = psycopg2.connect(database=DBNAME)\n", "VAR_4 = VAR_3.cursor()\n", "VAR_4.execute(VAR_2)\n", "VAR_5 = VAR_4.fetchall()\n", "VAR_3.close()\n", "return VAR_5\n" ]
[ "def get_top_articles(list_count):...\n", "\"\"\"docstring\"\"\"\n", "query = (\n 'select a.title, count(alv.article) as views from articles a, article_log_view alv where a.slug = alv.article group by a.title order by count(alv.article) desc limit %d;'\n % list_count)\n", "db = psycopg2.connect(data...
[ 0, 0, 4, 0, 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_12):...\n", "VAR_14 = (\n \"\"\"DELETE FROM events\n WHERE event_id = {0}\n \"\"\"\n .format(VAR_12))\n", "VAR_15 = self.cur.execute(VAR_14)\n", "self.conn.commit()\n", "return VAR_15\n" ]
[ "def delete_event(self, event_id):...\n", "sql = (\n \"\"\"DELETE FROM events\n WHERE event_id = {0}\n \"\"\"\n .format(event_id))\n", "affected_count = self.cur.execute(sql)\n", "self.conn.commit()\n", "return affected_count\n" ]
[ 0, 4, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_8(self):...\n", "VAR_9 = {}\n", "VAR_9['inventory_hostname'] = self.name\n", "VAR_9['inventory_hostname_short'] = self.name.split('.')[0]\n", "VAR_9['group_names'] = sorted([VAR_10.name for VAR_10 in self.get_groups() if\n VAR_10.name != 'all'])\n", "return VAR_9\n" ]
[ "def get_magic_vars(self):...\n", "results = {}\n", "results['inventory_hostname'] = self.name\n", "results['inventory_hostname_short'] = self.name.split('.')[0]\n", "results['group_names'] = sorted([g.name for g in self.get_groups() if g.\n name != 'all'])\n", "return results\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_15(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7, VAR_12 = self.make_xsrf_handling_app()\n", "VAR_15 = VAR_7.post('/request', expect_errors=True)\n", "self.assertEqual(403, VAR_15.status_int)\n", "self.assertFalse(VAR_12)\n" ]
[ "def test_xsrf_token_missing(self):...\n", "\"\"\"docstring\"\"\"\n", "app, calls = self.make_xsrf_handling_app()\n", "response = app.post('/request', expect_errors=True)\n", "self.assertEqual(403, response.status_int)\n", "self.assertFalse(calls)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@login_required...\n", "from .forms import MetadataForm\n", "VAR_15 = FUNC_8(VAR_3=candidate_id, VAR_2=request)\n", "return HttpResponseRedirect(reverse('register'))\n", "if VAR_15.thesis.is_locked():\n", "return HttpResponseForbidden('Thesis has already been submitted and is locked.'\n )\n", "if VA...
[ "@login_required...\n", "from .forms import MetadataForm\n", "candidate = _get_candidate(candidate_id=candidate_id, request=request)\n", "return HttpResponseRedirect(reverse('register'))\n", "if candidate.thesis.is_locked():\n", "return HttpResponseForbidden('Thesis has already been submitted and is locke...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "ImportFrom'", "Assign'", "Return'", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'", "Condition", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_5(self, **VAR_15):...\n", "VAR_19 = self.executable + ' ' + self.arguments\n", "for VAR_30 in ('filename', 'config_file'):\n", "VAR_15[VAR_30] = escape_path_argument(VAR_15.get(VAR_30, '') or '')\n", "return VAR_19.format(**kwargs)\n" ]
[ "def _create_command(self, **kwargs):...\n", "command = self.executable + ' ' + self.arguments\n", "for key in ('filename', 'config_file'):\n", "kwargs[key] = escape_path_argument(kwargs.get(key, '') or '')\n", "return command.format(**kwargs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Return'" ]
[ "def FUNC_3(self):...\n", "VAR_2 = self.connect()\n", "VAR_3 = 'DELETE FROM crimes;'\n", "VAR_2.close()\n", "cursor.execute(VAR_3)\n", "VAR_2.commit()\n" ]
[ "def clear_all(self):...\n", "connection = self.connect()\n", "query = 'DELETE FROM crimes;'\n", "connection.close()\n", "cursor.execute(query)\n", "connection.commit()\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_8(self, VAR_9, VAR_10=None, VAR_11=None, VAR_12=True, VAR_13=None,...\n", "if VAR_10 is not None:\n", "def FUNC_17(*VAR_20, **VAR_7):...\n", "VAR_21 = DebugAdapter.start\n", "return DebugAdapter.start_wrapper_script(VAR_10, *VAR_20, **kwargs)\n", "VAR_17 = Address.as_server if VAR_12 else Addres...
[ "def _launch(self, argv, script=None, wait_for_connect=None, detachable=True,...\n", "if script is not None:\n", "def start(*args, **kwargs):...\n", "start = DebugAdapter.start\n", "return DebugAdapter.start_wrapper_script(script, *args, **kwargs)\n", "new_addr = Address.as_server if detachable else Addre...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "FunctionDef'", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def __eq__(self, VAR_35):...\n", "return self.__class__ == VAR_35.__class__ and self.length == VAR_35.length\n" ]
[ "def __eq__(self, other):...\n", "return self.__class__ == other.__class__ and self.length == other.length\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "from flask import request\n", "from api import *\n", "import faf.db as db\n", "VAR_0 = 'string'\n", "@app.route('/achievements')...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = request.args.get('language', 'en')\n", "VAR_6 = request.args.get('region', 'US')\n", "VAR_11 = db.connection.cursor(db.pymysql....
[ "from flask import request\n", "from api import *\n", "import faf.db as db\n", "SELECT_ACHIEVEMENTS_QUERY = \"\"\"SELECT\n ach.id,\n ach.type,\n ach.total_steps,\n ach.revealed_icon_url,\n ach.unlocked_icon_url,\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "Import'", "Assign'", "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_22(VAR_30, VAR_31=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_31 is None:\n", "VAR_31 = threading.Lock()\n", "return CLASS_0(VAR_30, VAR_31)\n" ]
[ "def thread_safe_client(client, lock=None):...\n", "\"\"\"docstring\"\"\"\n", "if lock is None:\n", "lock = threading.Lock()\n", "return _ThreadSafeProxy(client, lock)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Return'" ]
[ "def __bool__(self):...\n", "return bool(self.updated_input or self.missing_output or self.forced or\n self.updated_input_run or self.noio or self.nooutput)\n" ]
[ "def __bool__(self):...\n", "return bool(self.updated_input or self.missing_output or self.forced or\n self.updated_input_run or self.noio or self.nooutput)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_7, VAR_54=None, VAR_55=None, *VAR_15, **VAR_16):...\n", "self.min = VAR_54\n", "self.max = VAR_55\n", "CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n" ]
[ "def __init__(self, param, min=None, max=None, *a, **kw):...\n", "self.min = min\n", "self.max = max\n", "Validator.__init__(self, param, *a, **kw)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "import asyncio\n", "import sqlite3\n", "import discord\n", "from discord.ext import commands\n", "import to_sqlalchemy\n", "def __init__(self, VAR_0):...\n", "self.bot = VAR_0\n", "self.updating = False\n", "@commands.group(aliases=['elite', 'ed'])...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1.in...
[ "import asyncio\n", "import sqlite3\n", "import discord\n", "from discord.ext import commands\n", "import to_sqlalchemy\n", "def __init__(self, bot):...\n", "self.bot = bot\n", "self.updating = False\n", "@commands.group(aliases=['elite', 'ed'])...\n", "\"\"\"docstring\"\"\"\n", "if ctx.invoked_...
[ 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 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "FunctionDef'", "Assign'", "Assign'", "Condition", "Docstring", "Condition", "Expr'", "Condition", "Docstring", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition...
[ "@csrf_exempt...\n", "\"\"\"docstring\"\"\"\n", "if VAR_7.method == 'POST':\n", "VAR_21 = VAR_7.POST.get('_action')\n", "print(VAR_21)\n", "if VAR_21 == 'registerService':\n", "VAR_22 = VAR_7.POST.get('name')\n", "if VAR_21 == 'getSchema':\n", "VAR_23 = VAR_7.POST.get('address')\n", "VAR_27 = FUNC...
[ "@csrf_exempt...\n", "\"\"\"docstring\"\"\"\n", "if request.method == 'POST':\n", "action = request.POST.get('_action')\n", "print(action)\n", "if action == 'registerService':\n", "request_name = request.POST.get('name')\n", "if action == 'getSchema':\n", "request_address = request.POST.get('address...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Condition"...
[ "def FUNC_6(self, VAR_11):...\n", "if VAR_11 and is_banned_domain(VAR_11):\n", "VAR_101.errors.add(errors.BANNED_DOMAIN)\n" ]
[ "def run(self, url):...\n", "if url and is_banned_domain(url):\n", "c.errors.add(errors.BANNED_DOMAIN)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'" ]
[ "def __hash__(self):...\n", "return self._file.__hash__()\n" ]
[ "def __hash__(self):...\n", "return self._file.__hash__()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(VAR_6):...\n", "VAR_10 = get_executing_test()\n", "VAR_14 = os.getcwd()\n", "os.chdir('/tmp')\n", "VAR_10.webdriver = selenium.webdriver.Chrome()\n", "os.chdir(VAR_14)\n", "VAR_10.webdriver.get(VAR_6)\n", "while VAR_10.webdriver:\n", "time.sleep(0.1)\n", "VAR_10.error = 'keyboard inter...
[ "def start_chrome_browser(url):...\n", "test = get_executing_test()\n", "old_cwd = os.getcwd()\n", "os.chdir('/tmp')\n", "test.webdriver = selenium.webdriver.Chrome()\n", "os.chdir(old_cwd)\n", "test.webdriver.get(url)\n", "while test.webdriver:\n", "time.sleep(0.1)\n", "test.error = 'keyboard int...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_12(VAR_16, VAR_19):...\n", "if isinstance(VAR_16, CLASS_1):\n", "return VAR_19 in VAR_16.flags\n", "return False\n" ]
[ "def is_flagged(value, flag):...\n", "if isinstance(value, AnnotatedString):\n", "return flag in value.flags\n", "return False\n" ]
[ 0, 0, 7, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_18(VAR_37):...\n", "VAR_37 = VAR_37.replace('[', '')\n", "VAR_37 = VAR_37.replace(']', '')\n", "VAR_45, VAR_46 = VAR_37.split(',')\n", "VAR_37 = '{} - {}'.format(VAR_46, VAR_45)\n", "return VAR_37\n" ]
[ "def reformat(score):...\n", "score = score.replace('[', '')\n", "score = score.replace(']', '')\n", "win, loss = score.split(',')\n", "score = '{} - {}'.format(loss, win)\n", "return score\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(self, VAR_8):...\n", "VAR_8.destroy()\n" ]
[ "def destroy_window(self, window):...\n", "window.destroy()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_9():...\n", "\"\"\"docstring\"\"\"\n", "VAR_35 = FUNC_8('tasks')\n", "VAR_36 = re.findall('string', VAR_35.text, re.X)\n", "VAR_37 = {}\n", "for VAR_46 in VAR_36:\n", "VAR_57, VAR_58, VAR_59 = VAR_46\n", "return VAR_37\n", "VAR_57 = int(VAR_57)\n", "VAR_37[VAR_58] = {'title': VAR_59, 'id...
[ "def get_tasks():...\n", "\"\"\"docstring\"\"\"\n", "r = admin_req('tasks')\n", "groups = re.findall(\n \"\"\"\n <tr>\\\\s*\n <td><a\\\\s+href=\"./task/(\\\\d+)\">(.*)</a></td>\\\\s*\n <td>(.*)</td>\\\\s*\n \"\"\"\n , r.text, re.X)\n", "tasks = {}\n", "for g in groups:\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'" ]
[ "def FUNC_18(self):...\n", "self.run_test_case(self.scenario.deregister_load_balancer_instances())\n" ]
[ "def test_w_deregister_load_balancer_instances(self):...\n", "self.run_test_case(self.scenario.deregister_load_balancer_instances())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(VAR_8, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = os.path.abspath(VAR_8)\n", "VAR_12 = FUNC_0(VAR_2, VAR_7='GET')\n", "if VAR_12 is None:\n", "return False\n", "f.write(VAR_12)\n", "logging.error(\"\"\"Failed to write to %s\n%s\"\"\", VAR_8, e)\n", "return True\n", "return Fals...
[ "def DownloadFile(local_file, url):...\n", "\"\"\"docstring\"\"\"\n", "local_file = os.path.abspath(local_file)\n", "url_data = UrlOpen(url, method='GET')\n", "if url_data is None:\n", "return False\n", "f.write(url_data)\n", "logging.error(\"\"\"Failed to write to %s\n%s\"\"\", local_file, e)\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Return'", "Expr'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_6(self):...\n", "self.assertTrue({'name': 'DocField'} in DatabaseQuery('DocType').execute(\n filters={'name': 'DocField'}))\n" ]
[ "def test_filters_4(self):...\n", "self.assertTrue({'name': 'DocField'} in DatabaseQuery('DocType').execute(\n filters={'name': 'DocField'}))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_5(self):...\n", "return self.data['points_created'], super().created()\n" ]
[ "def created(self):...\n", "return self.data['points_created'], super().created()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@property...\n", "if hasattr(self, 'curated_chemical') and self.curated_chemical is not None:\n", "return self.curated_chemical.true_chemname\n", "return None\n" ]
[ "@property...\n", "if hasattr(self, 'curated_chemical') and self.curated_chemical is not None:\n", "return self.curated_chemical.true_chemname\n", "return None\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_1 = 'http://my.url.com'\n", "VAR_2 = 'True'\n", "url_helper.urllib2.urlopen(mox.StrContains(VAR_1), timeout=mox.IgnoreArg()\n ).AndReturn(StringIO.StringIO(VAR_2))\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen(VAR_1, method='GET'), VAR_2)\n", "self...
[ "def testUrlOpenGETSuccess(self):...\n", "url = 'http://my.url.com'\n", "response = 'True'\n", "url_helper.urllib2.urlopen(mox.StrContains(url), timeout=mox.IgnoreArg()\n ).AndReturn(StringIO.StringIO(response))\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen(url, method='GET'), res...
[ 0, 0, 0, 5, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_2.route('/<pic_name>')...\n", "VAR_4 = 'SELECT comment, comment_id, img_name\\t\\t\\tFROM commentsTable'\n", "VAR_1.execute(VAR_4)\n", "return render_template('static_page.html', names=cursor, VAR_3=pic_name)\n" ]
[ "@app.route('/<pic_name>')...\n", "query = 'SELECT comment, comment_id, img_name\\t\\t\\tFROM commentsTable'\n", "cursor.execute(query)\n", "return render_template('static_page.html', names=cursor, pic_name=pic_name)\n" ]
[ 4, 4, 0, 4 ]
[ "Condition", "Assign'", "Expr'", "Return'" ]
[ "@functools.wraps(VAR_3)...\n", "VAR_23 = VAR_5.pop('timeout', None)\n", "VAR_24 = eventlet.spawn(VAR_3, self, *VAR_4, **kwargs)\n", "if VAR_23 is None:\n", "return VAR_24.wait()\n", "VAR_36 = eventlet.spawn_after(VAR_23, VAR_24.kill)\n", "VAR_48 = VAR_24.wait()\n", "VAR_36.cancel()\n", "return VAR_...
[ "@functools.wraps(f)...\n", "timeout = kwargs.pop('timeout', None)\n", "gt = eventlet.spawn(f, self, *args, **kwargs)\n", "if timeout is None:\n", "return gt.wait()\n", "kill_thread = eventlet.spawn_after(timeout, gt.kill)\n", "res = gt.wait()\n", "kill_thread.cancel()\n", "return res\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_5(VAR_0, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_16 = VAR_0.tournamentplayer_set.all()\n", "VAR_20 = GameSeeder(GreatPower.objects.all(), starts=100, iterations=10)\n", "for tp in VAR_16:\n", "VAR_20.add_player(tp)\n", "for n in range(1, VAR_6):\n", "VAR_29 = VAR_0.round_numbered(n)\n...
[ "def _create_game_seeder(tournament, round_number):...\n", "\"\"\"docstring\"\"\"\n", "tourney_players = tournament.tournamentplayer_set.all()\n", "seeder = GameSeeder(GreatPower.objects.all(), starts=100, iterations=10)\n", "for tp in tourney_players:\n", "seeder.add_player(tp)\n", "for n in range(1, r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Expr'", "For", "Assign'", "For", "For", "For", "Return'", "Assign'", "Expr'", "For", "Expr'", "Assert'", "Expr'" ]
[ "def FUNC_0():...\n", "VAR_8, VAR_3 = FUNC_1()\n", "VAR_9 = usr.validateCredentials(VAR_8, VAR_3, VAR_6)\n", "return VAR_9\n" ]
[ "def isUserAuthorized():...\n", "username, password = getUsernameAndPassword()\n", "response = usr.validateCredentials(username, password, mysql)\n", "return response\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_23(VAR_11):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ "def _fake_recv(ignore_arg):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_16(self, VAR_34, VAR_35):...\n", "\"\"\"docstring\"\"\"\n", "return os.write(VAR_34, VAR_35)\n" ]
[ "def write(self, fd, string):...\n", "\"\"\"docstring\"\"\"\n", "return os.write(fd, string)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_7(self, VAR_17):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = {'page_title': 'Access Denied', 'error': VAR_17}\n", "self.reply('auth/access_denied.html', VAR_15=env, VAR_16=401)\n" ]
[ "def authentication_error(self, error):...\n", "\"\"\"docstring\"\"\"\n", "env = {'page_title': 'Access Denied', 'error': error}\n", "self.reply('auth/access_denied.html', env=env, status=401)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_46(self, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "VAR_56 = self.regex.search(VAR_16)\n", "if VAR_56 is not None:\n", "return VAR_56.group('value')\n" ]
[ "def is_periodic(self, value):...\n", "\"\"\"docstring\"\"\"\n", "m = self.regex.search(value)\n", "if m is not None:\n", "return m.group('value')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "def FUNC_19(self, VAR_11):...\n", "\"\"\"docstring\"\"\"\n", "if len(self.iscsi_ips) == 1:\n", "return self.iscsi_ips.keys()[0]\n", "VAR_15 = self._get_active_nsp(VAR_11)\n", "if VAR_15 is None:\n", "VAR_15 = self._get_least_used_nsp(self._get_iscsi_nsps())\n", "return self._get_ip_using_nsp(VAR_15)\...
[ "def _get_iscsi_ip(self, hostname):...\n", "\"\"\"docstring\"\"\"\n", "if len(self.iscsi_ips) == 1:\n", "return self.iscsi_ips.keys()[0]\n", "nsp = self._get_active_nsp(hostname)\n", "if nsp is None:\n", "nsp = self._get_least_used_nsp(self._get_iscsi_nsps())\n", "return self._get_ip_using_nsp(nsp)\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Return'", "Condition", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_30():...\n", "if VAR_3 == 'text':\n", "print('Input file: %s' % VAR_75)\n", "VAR_52 = FUNC_2(VAR_15, VAR_2, VAR_3=output_mode, VAR_4=output_limit, VAR_5\n =spires, VAR_6=match_mode, VAR_7=no_cache, VAR_8=with_author_keywords,\n VAR_9=rebuild_cache, VAR_10=only_core_tags, VAR_11=extract_acronym...
[ "def process_lines():...\n", "if output_mode == 'text':\n", "print('Input file: %s' % source)\n", "output = get_keywords_from_text(text_lines, taxonomy_name, output_mode=\n output_mode, output_limit=output_limit, spires=spires, match_mode=\n match_mode, no_cache=no_cache, with_author_keywords=\n with...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Condition", "Return'", "Condition", "For", "Expr'" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n", "from builtins import object\n", "from pants.backend.jvm.subsystems.dependency_context import DependencyContext\n", "from pants.backend.jvm.subsystems.java import Java\n", "from pants.backend.jvm.subsystems.jvm_tool_mixi...
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n", "from builtins import object\n", "from pants.backend.jvm.subsystems.dependency_context import DependencyContext\n", "from pants.backend.jvm.subsystems.java import Java\n", "from pants.backend.jvm.subsystems.jvm_tool_mixi...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "Assign'", "Assign...
[ "def FUNC_10(self):...\n", "from invenio.modules.oauthclient.models import RemoteAccount\n", "RemoteAccount.create(1, 'testid', None)\n", "self.assert401(self.client.get(url_for('oauthclient_settings.index'),\n follow_redirects=True))\n", "self.login('admin', '')\n", "VAR_10 = self.client.get(url_for('...
[ "def test_settings_view(self):...\n", "from invenio.modules.oauthclient.models import RemoteAccount\n", "RemoteAccount.create(1, 'testid', None)\n", "self.assert401(self.client.get(url_for('oauthclient_settings.index'),\n follow_redirects=True))\n", "self.login('admin', '')\n", "res = self.client.get(u...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Assert'", "Assert'", "Assert'", "Assert'" ]
[ "def FUNC_2(VAR_7, VAR_3, VAR_4):...\n", "VAR_22 = VAR_3[VAR_7]\n", "VAR_23 = SymbolicInput(VAR_4[0], 'Not', VAR_22)\n", "VAR_3[VAR_4[0]] = VAR_23\n", "VAR_4[0] -= 1\n" ]
[ "def makeJump(x, symbols, symId):...\n", "sym = symbols[x]\n", "newSym = SymbolicInput(symId[0], 'Not', sym)\n", "symbols[symId[0]] = newSym\n", "symId[0] -= 1\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "AugAssign'" ]
[ "def FUNC_14(self, VAR_18):...\n", "\"\"\"docstring\"\"\"\n", "VAR_25 = self._eql_execute('volume', 'select', VAR_18['volume_name'],\n 'snapshot', 'create-now')\n", "VAR_0.error(_('Failed to create snapshot of volume %s'), VAR_18['volume_name'])\n", "VAR_9 = 'Snapshot name is '\n", "VAR_45 = self._get_...
[ "def create_snapshot(self, snapshot):...\n", "\"\"\"docstring\"\"\"\n", "out = self._eql_execute('volume', 'select', snapshot['volume_name'],\n 'snapshot', 'create-now')\n", "LOG.error(_('Failed to create snapshot of volume %s'), snapshot['volume_name'])\n", "prefix = 'Snapshot name is '\n", "snap_name...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_36(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(i int)')\n", "VAR_4 = self.cursor.execute('delete from t1')\n", "self.assertEqual(VAR_4, self.cursor)\n" ]
[ "def test_retcursor_nodata(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(i int)')\n", "v = self.cursor.execute('delete from t1')\n", "self.assertEqual(v, self.cursor)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_25(self, VAR_19=None):...\n", "super().clean_fields(VAR_19=exclude)\n", "if self.tracker.has_changed('group_type_id') and self.extracted_docs():\n", "VAR_31 = (\n 'The Group Type may not be changed once extracted documents have been associated with the group.'\n )\n" ]
[ "def clean_fields(self, exclude=None):...\n", "super().clean_fields(exclude=exclude)\n", "if self.tracker.has_changed('group_type_id') and self.extracted_docs():\n", "msg = (\n 'The Group Type may not be changed once extracted documents have been associated with the group.'\n )\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Assign'" ]
[ "def __bool__(self):...\n", "return bool(self._r_item_)\n" ]
[ "def __bool__(self):...\n", "return bool(self._r_item_)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "__author__ = 'vladimir'\n", "import ujson\n", "from flask import Blueprint\n", "VAR_0 = '/thread'\n", "VAR_1 = Blueprint('thread', __name__)\n", "@VAR_1.route(VAR_0 + '/create', methods=['GET'])...\n", "return ujson.dumps({'success': True})\n" ]
[ "__author__ = 'vladimir'\n", "import ujson\n", "from flask import Blueprint\n", "BASE_URL = '/thread'\n", "thread = Blueprint('thread', __name__)\n", "@thread.route(BASE_URL + '/create', methods=['GET'])...\n", "return ujson.dumps({'success': True})\n" ]
[ 0, 0, 0, 4, 4, 0, 0 ]
[ "Assign'", "Import'", "ImportFrom'", "Assign'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_15(self, VAR_65):...\n", "if self.overwrite_workdir is None:\n", "if not os.path.exists(VAR_65):\n", "os.makedirs(VAR_65)\n", "self._workdir = VAR_65\n", "os.chdir(VAR_65)\n" ]
[ "def workdir(self, workdir):...\n", "if self.overwrite_workdir is None:\n", "if not os.path.exists(workdir):\n", "os.makedirs(workdir)\n", "self._workdir = workdir\n", "os.chdir(workdir)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_38(self, VAR_40, VAR_41, VAR_42=None):...\n", "\"\"\"docstring\"\"\"\n", "self._names[VAR_40] = VAR_41, VAR_42\n", "if VAR_42 is None:\n", "setattr(self, VAR_40, self[VAR_41])\n", "setattr(self, VAR_40, CLASS_2(VAR_37=self[index:end]))\n" ]
[ "def set_name(self, name, index, end=None):...\n", "\"\"\"docstring\"\"\"\n", "self._names[name] = index, end\n", "if end is None:\n", "setattr(self, name, self[index])\n", "setattr(self, name, Namedlist(toclone=self[index:end]))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def at_login(self):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def FUNC_18(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7, VAR_12 = self.make_xsrf_handling_app(VAR_4='tok')\n", "VAR_17 = VAR_7.get('/request').body\n", "VAR_7.post('/request', {'tok': VAR_17})\n", "self.assertEqual([('POST', True)], VAR_12)\n" ]
[ "def test_xsrf_token_uses_xsrf_token_request_param(self):...\n", "\"\"\"docstring\"\"\"\n", "app, calls = self.make_xsrf_handling_app(xsrf_token_request_param='tok')\n", "token = app.get('/request').body\n", "app.post('/request', {'tok': token})\n", "self.assertEqual([('POST', True)], calls)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_3(self, *VAR_2, **VAR_1):...\n", "if VAR_1.pop('add_xsrf_token', True):\n", "VAR_1 = self._set_xsrf_headers(VAR_1)\n", "VAR_0 = super(CLASS_0, self).post(*VAR_2, **kwargs)\n", "self._store_xsrf_token(VAR_0)\n", "return VAR_0\n" ]
[ "def post(self, *args, **kwargs):...\n", "if kwargs.pop('add_xsrf_token', True):\n", "kwargs = self._set_xsrf_headers(kwargs)\n", "response = super(Session, self).post(*args, **kwargs)\n", "self._store_xsrf_token(response)\n", "return response\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "import mimetypes\n", "import os\n", "from django.contrib.gis.db.models import GeometryField\n", "from django.contrib.gis.db.models.functions import Envelope\n", "from django.core.exceptions import ObjectDoesNotExist\n", "from django.db.models.functions import Cast\n", "from django.http import HttpRespo...
[ "import mimetypes\n", "import os\n", "from django.contrib.gis.db.models import GeometryField\n", "from django.contrib.gis.db.models.functions import Envelope\n", "from django.core.exceptions import ObjectDoesNotExist\n", "from django.db.models.functions import Cast\n", "from django.http import HttpRespo...
[ 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Return'" ]
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = '/api/apps'\n", "VAR_3 = self.client.post(VAR_2)\n", "self.assertEqual(VAR_3.status_code, 201)\n", "VAR_4 = VAR_3.data['id']\n", "self.assertIn('structure', VAR_3.data)\n", "self.assertEqual(VAR_3.data['structure'], {})\n", "VAR_7 = App.o...
[ "def test_app_structure_is_valid_json(self):...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "self.assertIn('structure', response.data)\n", "self.assertEqual(response.data[...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_1(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "from opennode.oms.zodb import db\n", "VAR_6 = db.get_root()['oms_root']\n", "VAR_7, VAR_8 = FUNC_0(VAR_6, VAR_2)\n", "if VAR_7 and not VAR_8:\n", "return VAR_7[-1]\n", "return None\n" ]
[ "def traverse1(path):...\n", "\"\"\"docstring\"\"\"\n", "from opennode.oms.zodb import db\n", "oms_root = db.get_root()['oms_root']\n", "objs, untraversed_path = traverse_path(oms_root, path)\n", "if objs and not untraversed_path:\n", "return objs[-1]\n", "return None\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "ImportFrom'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_35(self, VAR_14):...\n", "VAR_20 = self.get_related_model(VAR_14)\n", "return self.session.query(VAR_20).all()\n" ]
[ "def query_model_relation(self, col_name):...\n", "model = self.get_related_model(col_name)\n", "return self.session.query(model).all()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_0, VAR_1, **VAR_2):...\n", "VAR_18 = VAR_1.course_instance\n", "if not VAR_18 and VAR_1.submission:\n", "VAR_18 = VAR_1.submission.exercise.course_instance\n", "CLASS_0.invalidate(VAR_18, VAR_1.recipient.user)\n" ]
[ "def invalidate_notification(sender, instance, **kwargs):...\n", "course = instance.course_instance\n", "if not course and instance.submission:\n", "course = instance.submission.exercise.course_instance\n", "CachedPoints.invalidate(course, instance.recipient.user)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Expr'" ]
[ "def __iter__(self):...\n", "" ]
[ "def __iter__(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_4(VAR_2, VAR_3=None, VAR_4=None, VAR_5=0, VAR_6=20, VAR_7=None):...\n", "VAR_11 = []\n", "if VAR_4:\n", "if VAR_4.blogger:\n", "if VAR_3:\n", "VAR_11.append('t1.blogger=\"%s\"' % frappe.db.escape(VAR_4.blogger))\n", "if VAR_4.blog_category:\n", "VAR_11.append('(t1.content like \"%{0}%\" or t...
[ "def get_blog_list(doctype, txt=None, filters=None, limit_start=0,...\n", "conditions = []\n", "if filters:\n", "if filters.blogger:\n", "if txt:\n", "conditions.append('t1.blogger=\"%s\"' % frappe.db.escape(filters.blogger))\n", "if filters.blog_category:\n", "conditions.append('(t1.content like \"%{...
[ 0, 0, 0, 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'", "Condition", "Condition", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'...
[ "\"\"\"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'" ]
[ "\"\"\"todo_server_db.py\n\nA class for communicating with MySQL to add, update, and remove tags and tasks.\n\"\"\"\n", "import sys\n", "import datetime\n", "import MySQLdb\n", "\"\"\"string\"\"\"\n", "VAR_0 = 'misc'\n", "VAR_1 = 0\n", "VAR_2 = 1\n", "VAR_3 = 2\n", "VAR_4 = 3\n", "VAR_5 = 4\n", ...
[ "\"\"\"todo_server_db.py\n\nA class for communicating with MySQL to add, update, and remove tags and tasks.\n\"\"\"\n", "import sys\n", "import datetime\n", "import MySQLdb\n", "\"\"\"Interface to the MySQL database.\n\n A class for communicating with MySQL to add, update, and remove tags and\n tasks....
[ 0, 0, 0, 0, 0, 0, 0, 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'", "Import'", "Import'", "Import'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Condition", "Docstring", "Assign'", "Return'", "FunctionDef'", "Expr'", "Docstring", "Retu...
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_16 = copy(self.flow)\n", "VAR_16.redirect_uri = url_for('oidc_callback', _external=True)\n", "return VAR_16\n" ]
[ "def flow_for_request(self):...\n", "\"\"\"docstring\"\"\"\n", "flow = copy(self.flow)\n", "flow.redirect_uri = url_for('oidc_callback', _external=True)\n", "return flow\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_12(self, VAR_1):...\n", "VAR_22 = VAR_1.split('-')\n", "VAR_23 = int(datetime(int(VAR_22[0]), int(VAR_22[1]), 1, 0, 0, 0, tzinfo=\n pytz.utc).timestamp())\n", "VAR_24 = int(datetime(int(VAR_22[0]), int(VAR_22[1]), self.\n get_last_day_of_month(VAR_1), 23, 59, 59, tzinfo=pytz.utc).timestamp())\...
[ "def get_epoch_month(self, date):...\n", "s = date.split('-')\n", "epoch_start = int(datetime(int(s[0]), int(s[1]), 1, 0, 0, 0, tzinfo=pytz.\n utc).timestamp())\n", "epoch_end = int(datetime(int(s[0]), int(s[1]), self.get_last_day_of_month(\n date), 23, 59, 59, tzinfo=pytz.utc).timestamp())\n", "retur...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(self):...\n", "\"\"\"docstring\"\"\"\n", "self.keypairs[self.tenant_id] = self.verify(30, self._create_keypair, 1,\n 'Keypair can not be created.', 'keypair creation', self.compute_client)\n" ]
[ "def test_001_create_keypairs(self):...\n", "\"\"\"docstring\"\"\"\n", "self.keypairs[self.tenant_id] = self.verify(30, self._create_keypair, 1,\n 'Keypair can not be created.', 'keypair creation', self.compute_client)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "def FUNC_21(self):...\n", "self.assertTrue(sys.stderr.fileno() > 2,\n 'Expected a pseudofile as stderr, got: {}'.format(sys.stderr))\n", "VAR_12, VAR_13, VAR_14 = sys.stdout, sys.stderr, sys.stdin\n", "self.assertEqual(sys.stdin.fileno(), 0)\n", "self.assertEqual(sys.stdout.fileno(), 1)\n", "self.asse...
[ "def test_stdio_as(self):...\n", "self.assertTrue(sys.stderr.fileno() > 2,\n 'Expected a pseudofile as stderr, got: {}'.format(sys.stderr))\n", "old_stdout, old_stderr, old_stdin = sys.stdout, sys.stderr, sys.stdin\n", "self.assertEqual(sys.stdin.fileno(), 0)\n", "self.assertEqual(sys.stdout.fileno(), 1)...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_8(self, VAR_7, VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "VAR_13 = self._attributes.copy()\n", "VAR_13['event'] = VAR_7\n", "VAR_13['message'] = VAR_8\n", "self._remote.url_read_json('/swarming/api/v1/bot/event', VAR_13=data)\n" ]
[ "def post_event(self, event_type, message):...\n", "\"\"\"docstring\"\"\"\n", "data = self._attributes.copy()\n", "data['event'] = event_type\n", "data['message'] = message\n", "self._remote.url_read_json('/swarming/api/v1/bot/event', data=data)\n" ]
[ 0, 0, 0, 0, 0, 5 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_3(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', 'select', VAR_1['name'], 'show')\n", "self.driver._eql_execute('volume', 'select', VAR_1['name'], 'offline')\n", "s...
[ "def test_delete_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', 'select', volume['name'], 'show')\n", "self.driver._eql_execute('volume', 'select', volume['name'], 'off...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@acs_action('terminate-account-action')...\n", "\"\"\"docstring\"\"\"\n", "return FUNC_3('reauthn-for-termination', VAR_0, VAR_1)\n" ]
[ "@acs_action('terminate-account-action')...\n", "\"\"\"docstring\"\"\"\n", "return _reauthn('reauthn-for-termination', session_info, user)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "@VAR_2.route('/data/setadetails/')...\n", "VAR_52 = request.args.get('date', '')\n", "VAR_53 = request.args.get('active', 0)\n", "VAR_54 = request.args.get('buildbot', 0)\n", "VAR_55 = request.args.get('branch', '')\n", "VAR_56 = request.args.get('taskcluster', 0)\n", "VAR_57 = request.args.get('priori...
[ "@app.route('/data/setadetails/')...\n", "date = request.args.get('date', '')\n", "active = request.args.get('active', 0)\n", "buildbot = request.args.get('buildbot', 0)\n", "branch = request.args.get('branch', '')\n", "taskcluster = request.args.get('taskcluster', 0)\n", "priority = request.args.get('p...
[ 0, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "For", "Assign'", "Assign'", "Expr'", "Conditi...
[ "def FUNC_5(self):...\n", "self.uut.executable = 'echo'\n", "self.uut.arguments = 'hello'\n", "self.uut.use_stdin = False\n", "self.uut.use_stderr = True\n", "self.uut.process_output = lambda output, filename, file: output\n", "VAR_1 = self.uut.lint('unused_filename')\n", "self.assertEqual((), VAR_1)\...
[ "def test_stderr_output(self):...\n", "self.uut.executable = 'echo'\n", "self.uut.arguments = 'hello'\n", "self.uut.use_stdin = False\n", "self.uut.use_stderr = True\n", "self.uut.process_output = lambda output, filename, file: output\n", "out = self.uut.lint('unused_filename')\n", "self.assertEqual((...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Assert'", "Assign'", "Assign'", "Expr'", "Assign'" ]
[ "def FUNC_13(self, **VAR_6):...\n", "from common.forms import JsonField\n", "VAR_34 = {'form_class': VAR_17}\n", "VAR_34.update(VAR_6)\n", "return super().formfield(**defaults)\n" ]
[ "def formfield(self, **kwargs):...\n", "from common.forms import JsonField\n", "defaults = {'form_class': JsonField}\n", "defaults.update(kwargs)\n", "return super().formfield(**defaults)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "ImportFrom'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_2(self):...\n", "CLASS_2.ScenarioMaker().given_a_deep_link_domain('pachatary://app'\n ).given_a_dynamic_link('').when_call_experience_redirect('AsdE43E4'\n ).then_response_should_be_a_redirect_to(\n 'pachatary://app/experiences/AsdE43E4')\n" ]
[ "def test_when_there_is_no_dynamic_link_returns_deep_link(self):...\n", "RedirectExperienceTestCase.ScenarioMaker().given_a_deep_link_domain(\n 'pachatary://app').given_a_dynamic_link('').when_call_experience_redirect(\n 'AsdE43E4').then_response_should_be_a_redirect_to(\n 'pachatary://app/experiences/As...
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "import sublime\n", "import sublime_plugin\n", "import os\n", "import re\n", "import Urtext.urtext as Urtext\n", "def FUNC_0(self, VAR_0):...\n", "if self.view.settings().has('traverse'):\n", "if self.view.settings().get('traverse') == 'true':\n", "self.view.settings().set('traverse', 'true')\n", ...
[ "import sublime\n", "import sublime_plugin\n", "import os\n", "import re\n", "import Urtext.urtext as Urtext\n", "def run(self, edit):...\n", "if self.view.settings().has('traverse'):\n", "if self.view.settings().get('traverse') == 'true':\n", "self.view.settings().set('traverse', 'true')\n", "sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "FunctionDef'", "Condition", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'", "Assign'", "Assign'", "For", "Condition", "Expr'", "Expr'", "FunctionDef'", "AugAssign'", "Condition", "Assign'", "...