lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_0(self):...\n", "VAR_0 = Section('some_name')\n", "self.uut = Lint(VAR_0, None)\n" ]
[ "def setUp(self):...\n", "section = Section('some_name')\n", "self.uut = Lint(section, None)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def __init__(self):...\n", "self.updated_input = set()\n", "self.updated_input_run = set()\n", "self.missing_output = set()\n", "self.incomplete_output = set()\n", "self.forced = False\n", "self.noio = False\n", "self.nooutput = False\n", "self.derived = True\n" ]
[ "def __init__(self):...\n", "self.updated_input = set()\n", "self.updated_input_run = set()\n", "self.missing_output = set()\n", "self.incomplete_output = set()\n", "self.forced = False\n", "self.noio = False\n", "self.nooutput = False\n", "self.derived = True\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_26(VAR_16, VAR_22, VAR_17):...\n", "VAR_53 = (\n \"select date from ranks where scene='{}' and player='{}' order by date desc limit 1;\"\n .format(VAR_22, VAR_17))\n", "VAR_54 = VAR_16.exec(VAR_53)\n", "VAR_23 = VAR_54[0][0]\n", "return VAR_23\n" ]
[ "def get_last_ranked_month(db, scene, player):...\n", "sql = (\n \"select date from ranks where scene='{}' and player='{}' order by date desc limit 1;\"\n .format(scene, player))\n", "res = db.exec(sql)\n", "date = res[0][0]\n", "return date\n" ]
[ 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_17(self):...\n", "def FUNC_23(VAR_11):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ "def test_get_output(self):...\n", "def _fake_recv(ignore_arg):...\n", "return '%s> ' % self.configuration.eqlx_group_name\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def FUNC_0(VAR_7):...\n", "return VAR_7.encode(VAR_3)\n" ]
[ "def output(what):...\n", "return what.encode(ENCODING)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self):...\n", "self.assertFalse({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n filters=[['DocType', 'name', 'like', 'J%']]))\n" ]
[ "def test_filters_1(self):...\n", "self.assertFalse({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n filters=[['DocType', 'name', 'like', 'J%']]))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "for VAR_28, VAR_27 in zip(self.output, self.rule.output):\n", "if VAR_28 in self.dynamic_output:\n", "VAR_29 = self.expand_dynamic(VAR_27, VAR_13=self.wildcards, VAR_14=_IOFile.\n dynamic_fill)\n", "yield VAR_28\n", "if not VAR_29:\n", "yield VAR_27\n",...
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "for f, f_ in zip(self.output, self.rule.output):\n", "if f in self.dynamic_output:\n", "expansion = self.expand_dynamic(f_, restriction=self.wildcards, omit_value=\n _IOFile.dynamic_fill)\n", "yield f\n", "if not expansion:\n", "yield f_\n", "for f, _...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 7 ]
[ "Condition", "Docstring", "For", "Condition", "Assign'", "Expr'", "Condition", "Expr'", "For", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "\"\"\"docstring\"\"\"\n", "self.common.client_login()\n", "VAR_18 = self.common.create_volume_from_snapshot(VAR_6, VAR_8)\n", "self.common.client_logout()\n", "return {'metadata': VAR_18}\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "\"\"\"docstring\"\"\"\n", "self.common.client_login()\n", "metadata = self.common.create_volume_from_snapshot(volume, snapshot)\n", "self.common.client_logout()\n", "return {'metadata': metadata}\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "@functools.wraps(VAR_1)...\n", "if g.user is None:\n", "return redirect(url_for('auth.login'))\n", "if g.user['admin'] != 1:\n", "return redirect(url_for('blog.feedpage', VAR_3=0))\n", "return VAR_1(**kwargs)\n" ]
[ "@functools.wraps(view)...\n", "if g.user is None:\n", "return redirect(url_for('auth.login'))\n", "if g.user['admin'] != 1:\n", "return redirect(url_for('blog.feedpage', page=0))\n", "return view(**kwargs)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_8(self, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = {}\n", "VAR_5['volumeName'] = VAR_10['name']\n", "VAR_5['prompt'] = 'false'\n", "VAR_27 = self._cliq_get_volume_info(VAR_10['name'])\n", "VAR_0.error('Volume did not exist. It will not be deleted')\n", "self._cliq_run_xml('deleteVol...
[ "def delete_volume(self, volume):...\n", "\"\"\"docstring\"\"\"\n", "cliq_args = {}\n", "cliq_args['volumeName'] = volume['name']\n", "cliq_args['prompt'] = 'false'\n", "volume_info = self._cliq_get_volume_info(volume['name'])\n", "LOG.error('Volume did not exist. It will not be deleted')\n", "self._c...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_0(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_18 = pq.backends.IBMBackend(**self.filter_kwargs_for_backend(self.kwargs))\n", "self.eng = pq.MainEngine(VAR_18, engine_list=pq.setups.ibm.get_engine_list())\n", "super().reset()\n" ]
[ "def reset(self):...\n", "\"\"\"docstring\"\"\"\n", "backend = pq.backends.IBMBackend(**self.filter_kwargs_for_backend(self.kwargs))\n", "self.eng = pq.MainEngine(backend, engine_list=pq.setups.ibm.get_engine_list())\n", "super().reset()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'" ]
[ "import copy\n", "from operator import itemgetter\n", "from openerp.osv import fields, orm, osv\n", "from openerp.tools import DEFAULT_SERVER_DATE_FORMAT\n", "from tools.safe_eval import safe_eval\n", "from openerp.tools.translate import _\n", "\"\"\" Budget Item\n\n This is a link between budgets an...
[ "import copy\n", "from operator import itemgetter\n", "from openerp.osv import fields, orm, osv\n", "from openerp.tools import DEFAULT_SERVER_DATE_FORMAT\n", "from tools.safe_eval import safe_eval\n", "from openerp.tools.translate import _\n", "\"\"\" Budget Item\n\n This is a link between budgets an...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For",...
[ "import time\n", "import mox\n", "import paramiko\n", "from cinder import context\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder.openstack.common import processutils\n", "from cinder import test\n", "from cinder.volume import configuration ...
[ "import time\n", "import mox\n", "import paramiko\n", "from cinder import context\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder.openstack.common import processutils\n", "from cinder import test\n", "from cinder.volume import configuration ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "...
[ "def FUNC_4(VAR_30):...\n", "VAR_39 = 'meal_planner.db'\n", "VAR_50 = 'ingredients_' + str(VAR_13)\n", "conn.execute('CREATE TABLE IF NOT EXISTS ' + VAR_50 + ' (ingredients text)')\n", "conn.execute('INSERT INTO ' + VAR_50 + ' VALUES (?);', (VAR_30,))\n" ]
[ "def save_ingredients(ingredients):...\n", "database_file = 'meal_planner.db'\n", "tableName = 'ingredients_' + str(weekNumber)\n", "conn.execute('CREATE TABLE IF NOT EXISTS ' + tableName + ' (ingredients text)')\n", "conn.execute('INSERT INTO ' + tableName + ' VALUES (?);', (ingredients,))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@property...\n", "return self.type == 'HH'\n" ]
[ "@property...\n", "return self.type == 'HH'\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@classmethod...\n", "def FUNC_25(VAR_3, VAR_6):...\n", "VAR_38 = FUNC_1(VAR_3)\n", "VAR_45, VAR_41 = VAR_38.accept()\n", "return Connection(VAR_45, VAR_38)\n" ]
[ "@classmethod...\n", "def connect(addr, timeout):...\n", "server = create_server(addr)\n", "client, _ = server.accept()\n", "return Connection(client, server)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "@VAR_0.route('/processing')...\n", "VAR_16 = time.time()\n", "VAR_17 = VAR_10.get('domain', None)\n", "if VAR_17 == None:\n", "VAR_18 = 'data/%s' % (VAR_17,)\n", "VAR_19 = path_dict(VAR_18)\n", "VAR_20 = json.dumps(VAR_19, sort_keys=True, indent=4)\n", "VAR_21 = path_number_of_files(VAR_18)\n", "VA...
[ "@app.route('/processing')...\n", "proc_start_time = time.time()\n", "domain = session.get('domain', None)\n", "if domain == None:\n", "path = 'data/%s' % (domain,)\n", "hierarchy_dict = path_dict(path)\n", "hierarchy_json = json.dumps(hierarchy_dict, sort_keys=True, indent=4)\n", "n_files = path_numb...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_15(self, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "return CLASS_0(self, VAR_6)\n" ]
[ "def create(self, products):...\n", "\"\"\"docstring\"\"\"\n", "return Zinc(self, products)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def __init__(self, VAR_0):...\n", "self.__conn = VAR_0\n" ]
[ "def __init__(self, conn):...\n", "self.__conn = conn\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "\"\"\"\nConfiguration (file) handling for eduID IdP.\n\"\"\"\n", "import os\n", "import ConfigParser\n", "VAR_0 = {'debug': False, 'syslog_debug': '0', 'num_threads': '8', 'logdir':\n None, 'logfile': None, 'syslog_socket': None, 'listen_addr': '0.0.0.0',\n 'listen_port': '8088', 'pysaml2_config': 'idp...
[ "\"\"\"\nConfiguration (file) handling for eduID IdP.\n\"\"\"\n", "import os\n", "import ConfigParser\n", "_CONFIG_DEFAULTS = {'debug': False, 'syslog_debug': '0', 'num_threads': '8',\n 'logdir': None, 'logfile': None, 'syslog_socket': None, 'listen_addr':\n '0.0.0.0', 'listen_port': '8088', 'pysaml2_co...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Docstring", "Return'" ]
[ "def __repr__(self):...\n", "return json_encode(self, sort_keys=True)\n" ]
[ "def __repr__(self):...\n", "return json_encode(self, sort_keys=True)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_2 = '/api/apps'\n", "VAR_5 = {'id': 'autotest'}\n", "VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n", "self.assertEqual(VAR_3.status_code, 201)\n", "VAR_4 = VAR_3.data['id']\n", "if not os.path.exists(settings.DEIS_LOG_DIR):\n",...
[ "def test_app_actions(self):...\n", "url = '/api/apps'\n", "body = {'id': 'autotest'}\n", "response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "if not os.path.exists(settings.DEIS...
[ 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Exp...
[ "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_1(self, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_5['id'] in self.table_maps['confirmations']:\n", "VAR_45 = self.table_maps['confirmations'][VAR_5['id']][0]\n", "VAR_45 = None\n", "VAR_21 = [('customer response recieved', self._val_to_str(bool(VAR_45)))]\n", "for field_name in self.cu...
[ "def _confirmation(self, win):...\n", "\"\"\"docstring\"\"\"\n", "if win['id'] in self.table_maps['confirmations']:\n", "confirmation = self.table_maps['confirmations'][win['id']][0]\n", "confirmation = None\n", "values = [('customer response recieved', self._val_to_str(bool(confirmation)))]\n", "for fi...
[ 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'", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_14(self):...\n", "VAR_35 = {}\n", "VAR_36 = self.configuration.safe_get('volume_backend_name')\n", "VAR_35['volume_backend_name'] = VAR_36 or self.__class__.__name__\n", "VAR_35['driver_version'] = '1.0'\n", "VAR_35['reserved_percentage'] = 0\n", "VAR_35['storage_protocol'] = 'iSCSI'\n", "VA...
[ "def _update_backend_status(self):...\n", "data = {}\n", "backend_name = self.configuration.safe_get('volume_backend_name')\n", "data['volume_backend_name'] = backend_name or self.__class__.__name__\n", "data['driver_version'] = '1.0'\n", "data['reserved_percentage'] = 0\n", "data['storage_protocol'] = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_20(self, VAR_14):...\n", "" ]
[ "def is_relation_one_to_one(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_52(self):...\n", "VAR_39 = VAR_36.cursor()\n", "VAR_39.execute('begin')\n", "VAR_39.execute('create table t1(i int)')\n", "VAR_39.execute('rollback')\n", "def FUNC_58():...\n", "VAR_36.execute('rollback')\n", "self.assertRaises(pyodbc.Error, FUNC_58)\n" ]
[ "def _test_context_manager(self):...\n", "cursor = cnxn.cursor()\n", "cursor.execute('begin')\n", "cursor.execute('create table t1(i int)')\n", "cursor.execute('rollback')\n", "def test():...\n", "cnxn.execute('rollback')\n", "self.assertRaises(pyodbc.Error, test)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_4():...\n", "populate_test_database()\n", "FUNC_1('first playlist')\n", "VAR_11 = VAR_3.get('/playlists/1')\n", "assert VAR_11.json['status'] == 'OK'\n", "assert VAR_11.json['data'] == dict(id=1, VAR_8='first playlist',\n video_position=0)\n" ]
[ "def test_should_return_a_playlist():...\n", "populate_test_database()\n", "create_playlist('first playlist')\n", "response = test_app.get('/playlists/1')\n", "assert response.json['status'] == 'OK'\n", "assert response.json['data'] == dict(id=1, name='first playlist',\n video_position=0)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assert'", "Assert'" ]
[ "def FUNC_17(self):...\n", "VAR_12.remove(self)\n" ]
[ "def on_close(self):...\n", "runScriptWebSocketConnections.remove(self)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@rest_utils.ajax(data_required=True)...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1.DATA.get('removed'):\n", "api.nova.flavor_extra_delete(VAR_1, VAR_5, VAR_1.DATA.get('removed'))\n", "api.nova.flavor_extra_set(VAR_1, VAR_5, VAR_1.DATA['updated'])\n" ]
[ "@rest_utils.ajax(data_required=True)...\n", "\"\"\"docstring\"\"\"\n", "if request.DATA.get('removed'):\n", "api.nova.flavor_extra_delete(request, flavor_id, request.DATA.get('removed'))\n", "api.nova.flavor_extra_set(request, flavor_id, request.DATA['updated'])\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_0(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1.content_type in ('application/json', 'text/json'):\n", "return VAR_1\n", "VAR_4 = json.loads(VAR_1.body)\n", "if isinstance(VAR_4, (list, tuple)):\n", "VAR_0.warn('string')\n" ]
[ "def filter_json_xsrf(response):...\n", "\"\"\"docstring\"\"\"\n", "if response.content_type in ('application/json', 'text/json'):\n", "return response\n", "content = json.loads(response.body)\n", "if isinstance(content, (list, tuple)):\n", "log.warn(\n 'returning a json array is a potential security...
[ 0, 0, 0, 0, 5, 5, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_3(self, *VAR_21):...\n", "self.first.execute(*VAR_21)\n", "self.first.wait()\n", "self.second.execute(*VAR_21)\n", "self.second.wait()\n" ]
[ "def execute(self, *args):...\n", "self.first.execute(*args)\n", "self.first.wait()\n", "self.second.execute(*args)\n", "self.second.wait()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@property...\n", "for java_dist_dir in self._java_dist_dirs:\n", "if os.path.isdir(java_dist_dir):\n", "for VAR_3 in os.listdir(java_dist_dir):\n", "VAR_24 = os.path.join(java_dist_dir, VAR_3)\n", "if os.path.isdir(VAR_24):\n", "yield self.Location.from_home(VAR_24)\n" ]
[ "@property...\n", "for java_dist_dir in self._java_dist_dirs:\n", "if os.path.isdir(java_dist_dir):\n", "for path in os.listdir(java_dist_dir):\n", "home = os.path.join(java_dist_dir, path)\n", "if os.path.isdir(home):\n", "yield self.Location.from_home(home)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "For", "Condition", "For", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_14(self):...\n", "return self._get_ancestors().values()\n" ]
[ "def get_ancestors(self):...\n", "return self._get_ancestors().values()\n" ]
[ 0, 1 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(VAR_1, VAR_2, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = frozenset(VAR_2)\n", "VAR_7 = VAR_1 - VAR_2\n", "if VAR_7:\n", "VAR_22 = ' missing: %s' % sorted(VAR_7) if VAR_7 else ''\n", "return 'Unexpected %s%s; did you make a typo?' % (VAR_3, VAR_22)\n" ]
[ "def has_missing_keys(minimum_keys, actual_keys, name):...\n", "\"\"\"docstring\"\"\"\n", "actual_keys = frozenset(actual_keys)\n", "missing = minimum_keys - actual_keys\n", "if missing:\n", "msg_missing = ' missing: %s' % sorted(missing) if missing else ''\n", "return 'Unexpected %s%s; did you make a t...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "@VAR_47.middleware('response')...\n", "if VAR_51.status == 404 and VAR_6.path.endswith('/'):\n", "VAR_61 = VAR_6.path.rstrip('/')\n", "if VAR_6.query_string:\n", "VAR_61 = '{}?{}'.format(VAR_61, VAR_6.query_string)\n", "return response.redirect(VAR_61)\n" ]
[ "@app.middleware('response')...\n", "if original_response.status == 404 and request.path.endswith('/'):\n", "path = request.path.rstrip('/')\n", "if request.query_string:\n", "path = '{}?{}'.format(path, request.query_string)\n", "return response.redirect(path)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_27(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 8}, 'CONFIDENCE': {'MEDIUM': 8}}\n", "self.check_example('os-spawn.py', VAR_2)\n" ]
[ "def test_os_spawn(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 8}, 'CONFIDENCE': {'MEDIUM': 8}}\n", "self.check_example('os-spawn.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_12(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_14, VAR_15 = new_monitor_log_file(self._ray_params.redirect_output)\n", "VAR_16 = ray.services.start_monitor(self._redis_address, self.\n _node_ip_address, VAR_14=stdout_file, VAR_15=stderr_file,\n autoscaling_config=self._ray_params.autoscaling...
[ "def start_monitor(self):...\n", "\"\"\"docstring\"\"\"\n", "stdout_file, stderr_file = new_monitor_log_file(self._ray_params.\n redirect_output)\n", "process_info = ray.services.start_monitor(self._redis_address, self.\n _node_ip_address, stdout_file=stdout_file, stderr_file=stderr_file,\n autoscali...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_4(self):...\n", "self.assertTrue(self.client.login(VAR_1='autotest-1', VAR_2='password'))\n" ]
[ "def setUp(self):...\n", "self.assertTrue(self.client.login(username='autotest-1', password='password'))\n" ]
[ 0, 5 ]
[ "FunctionDef'", "Expr'" ]
[ "from flask import request\n", "import jwt\n", "import re\n", "import os\n", "from base64 import b64encode, b64decode\n", "import HybridRSA\n", "VAR_0 = open('resources/jwt_key', 'rb').read()\n", "VAR_1 = open('resources/jwt_key.pub', 'rb').read()\n", "VAR_2 = 201\n", "VAR_3 = 400\n", "VAR_4 = 4...
[ "from flask import request\n", "import jwt\n", "import re\n", "import os\n", "from base64 import b64encode, b64decode\n", "import HybridRSA\n", "SERVER_JWT_PRIVATE_KEY = open('resources/jwt_key', 'rb').read()\n", "SERVER_JWT_PUBLIC_KEY = open('resources/jwt_key.pub', 'rb').read()\n", "CREATED = 201\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_11(self, VAR_12=None, VAR_13=None):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_12 and not VAR_13:\n", "VAR_12, VAR_13 = self.model.rowCount() + 1, self.model.rowCount(\n ) + self.model.item_load_batch\n", "if self.filter_input and self.filter_input.text().lower():\n", "VAR_24 = self.filter...
[ "def load_torrents(self, start=None, end=None):...\n", "\"\"\"docstring\"\"\"\n", "if not start and not end:\n", "start, end = self.model.rowCount() + 1, self.model.rowCount(\n ) + self.model.item_load_batch\n", "if self.filter_input and self.filter_input.text().lower():\n", "filter_text = self.filter_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_20():...\n", "\"\"\"docstring\"\"\"\n", "assert sys.platform == 'linux' or sys.platform == 'linux2'\n", "VAR_48 = VAR_40.open('/dev/shm', VAR_40.O_RDONLY)\n", "VAR_56 = VAR_40.fstatvfs(VAR_48)\n", "VAR_40.close(VAR_48)\n", "return VAR_57\n", "VAR_57 = VAR_56.f_bsize * VAR_56.f_bavail\n" ]
[ "def get_shared_memory_bytes():...\n", "\"\"\"docstring\"\"\"\n", "assert sys.platform == 'linux' or sys.platform == 'linux2'\n", "shm_fd = os.open('/dev/shm', os.O_RDONLY)\n", "shm_fs_stats = os.fstatvfs(shm_fd)\n", "os.close(shm_fd)\n", "return shm_avail\n", "shm_avail = shm_fs_stats.f_bsize * shm_f...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Assign'", "Assign'", "Expr'", "Return'", "Assign'" ]
[ "def FUNC_0(VAR_8, VAR_9, VAR_10, VAR_11=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = VAR_8.components.netatmo\n", "VAR_13 = CLASS_1(VAR_12.NETATMO_AUTH, VAR_9.get(VAR_2, None))\n", "VAR_14 = []\n", "import pyatmo\n", "if VAR_1 in VAR_9:\n", "return None\n", "VAR_10(VAR_14, True)\n", "for VA...
[ "def setup_platform(hass, config, add_devices, discovery_info=None):...\n", "\"\"\"docstring\"\"\"\n", "netatmo = hass.components.netatmo\n", "data = NetAtmoData(netatmo.NETATMO_AUTH, config.get(CONF_STATION, None))\n", "dev = []\n", "import pyatmo\n", "if CONF_MODULES in config:\n", "return None\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Import'", "Condition", "Return'", "Expr'", "For", "For", "Condition", "For", "Expr'", "For", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_51):...\n", "VAR_81 = VAR_51\n", "VAR_51 = FUNC_3(VAR_51)\n", "if not VAR_51:\n", "return self.error(FUNC_4(VAR_81))\n", "VAR_15 = Account._by_name(VAR_51, True)\n", "return VAR_51\n", "return self.error(errors.USERNAME_TAKEN)\n" ]
[ "def run(self, user_name):...\n", "original_user_name = user_name\n", "user_name = chkuser(user_name)\n", "if not user_name:\n", "return self.error(whyuserbad(original_user_name))\n", "a = Account._by_name(user_name, True)\n", "return user_name\n", "return self.error(errors.USERNAME_TAKEN)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Return'", "Return'" ]
[ "def __init__(self):...\n", "self.content = VAR_2\n" ]
[ "def __init__(self):...\n", "self.content = content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "import json\n", "from http import HTTPStatus\n", "from urllib.parse import urlencode\n", "from django import test\n", "from django.conf import settings\n", "from django.contrib.contenttypes.models import ContentType\n", "from django.core import serializers\n", "from django.urls import reverse\n", "...
[ "import json\n", "from http import HTTPStatus\n", "from urllib.parse import urlencode\n", "from django import test\n", "from django.conf import settings\n", "from django.contrib.contenttypes.models import ContentType\n", "from django.core import serializers\n", "from django.urls import reverse\n", "...
[ 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'",...
[ "def FUNC_5(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.mox.ReplayAll()\n", "self.driver.ensure_export({}, VAR_1)\n" ]
[ "def test_ensure_export(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.mox.ReplayAll()\n", "self.driver.ensure_export({}, volume)...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_9):...\n", "DummyRequest.__init__(self, VAR_9)\n", "self.content = None\n", "self.code = None\n" ]
[ "def __init__(self, path):...\n", "DummyRequest.__init__(self, path)\n", "self.content = None\n", "self.code = None\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_6(self, VAR_33):...\n", "return VAR_33 != 'off' and bool(VAR_33)\n" ]
[ "def run(self, val):...\n", "return val != 'off' and bool(val)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(VAR_2, **VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "init_DBSession(VAR_3)\n", "VAR_5 = pyramid.config.Configurator(VAR_3=settings, root_factory=\n TraversalGlobalRootFactory)\n", "def FUNC_3(VAR_6):...\n", "for settings_key in VAR_12:\n", "assert VAR_5.registry.settings.get(settings_key)\...
[ "def main(global_config, **settings):...\n", "\"\"\"docstring\"\"\"\n", "init_DBSession(settings)\n", "config = pyramid.config.Configurator(settings=settings, root_factory=\n TraversalGlobalRootFactory)\n", "def assert_settings_keys(keys):...\n", "for settings_key in key:\n", "assert config.registry....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "FunctionDef'", "For", "Assert'", "Expr'", "For", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Condition", "ImportFrom'", "Import'", "Assign'", "Assign'", "Assert'", "FunctionDef'", "...
[ "def FUNC_1(self, VAR_1):...\n", "self.__init__()\n", "self.name = VAR_1.get('name')\n", "self.vars = VAR_1.get('vars', dict())\n", "self.depth = VAR_1.get('depth', 0)\n", "self.hosts = VAR_1.get('hosts', [])\n", "self._hosts = None\n", "VAR_7 = VAR_1.get('parent_groups', [])\n", "for parent_data in...
[ "def deserialize(self, data):...\n", "self.__init__()\n", "self.name = data.get('name')\n", "self.vars = data.get('vars', dict())\n", "self.depth = data.get('depth', 0)\n", "self.hosts = data.get('hosts', [])\n", "self._hosts = None\n", "parent_groups = data.get('parent_groups', [])\n", "for parent_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_5(self, VAR_9, **VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_7():...\n", "\"\"\"docstring\"\"\"\n", "VAR_10['env'] = self.env\n", "VAR_10['config'] = self.env.config\n", "VAR_10['params'] = self.params\n", "return VAR_10\n" ]
[ "def render(self, template_name, **template_vars):...\n", "\"\"\"docstring\"\"\"\n", "def get_vars():...\n", "\"\"\"docstring\"\"\"\n", "template_vars['env'] = self.env\n", "template_vars['config'] = self.env.config\n", "template_vars['params'] = self.params\n", "return template_vars\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@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.cursors.DictCursor)\n", "VAR_11.execute(VAR_0 + ' ORDER BY `order` ASC', {'language': VAR_5,\n 'region':...
[ "@app.route('/achievements')...\n", "\"\"\"docstring\"\"\"\n", "language = request.args.get('language', 'en')\n", "region = request.args.get('region', 'US')\n", "cursor = db.connection.cursor(db.pymysql.cursors.DictCursor)\n", "cursor.execute(SELECT_ACHIEVEMENTS_QUERY + ' ORDER BY `order` ASC', {\n 'la...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_4(VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "for directory in os.getenv('PATH').split(':'):\n", "if os.path.exists(os.path.join(directory, VAR_7)):\n", "return False\n", "return True\n" ]
[ "def executable_exists(executable):...\n", "\"\"\"docstring\"\"\"\n", "for directory in os.getenv('PATH').split(':'):\n", "if os.path.exists(os.path.join(directory, executable)):\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Return'", "Return'" ]
[ "def FUNC_23(self, VAR_14):...\n", "" ]
[ "def is_unique(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_1(self, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "cursor.execute(VAR_5)\n", "VAR_10 = cursor.fetchall()\n", "return VAR_10\n" ]
[ "def connect_sql(self, sql):...\n", "\"\"\"docstring\"\"\"\n", "cursor.execute(sql)\n", "result = cursor.fetchall()\n", "return result\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_10(self, VAR_2, VAR_3, VAR_4, *VAR_5):...\n", "self.write_data({'type': 'torrent_error', 'event': {'infohash': hexlify(\n VAR_4), 'error': VAR_5[0]}})\n" ]
[ "def on_torrent_error(self, subject, changetype, objectID, *args):...\n", "self.write_data({'type': 'torrent_error', 'event': {'infohash': hexlify(\n objectID), 'error': args[0]}})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self, *VAR_3, **VAR_4):...\n", "super(CLASS_0, self).__init__(*VAR_3, **kwargs)\n", "self.common = None\n", "self.configuration.append_config_values(hpcommon.hp3par_opts)\n", "self.configuration.append_config_values(san.san_opts)\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(HP3PARISCSIDriver, self).__init__(*args, **kwargs)\n", "self.common = None\n", "self.configuration.append_config_values(hpcommon.hp3par_opts)\n", "self.configuration.append_config_values(san.san_opts)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_2():...\n", "super(CLASS_4, self).__init__(slideParser.parse(VAR_10, slideLexer), VAR_2='\\n'\n )\n" ]
[ "def innerFunc():...\n", "super(Column, self).__init__(slideParser.parse(txt, slideLexer), after='\\n')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self, VAR_18, VAR_19):...\n", "self.fs = VAR_18\n", "self.cfg = VAR_19\n", "self.tempfiles = {}\n", "self.filenames = {}\n", "self.newcount = 0\n", "self.init_honeyfs(self.cfg.get('honeypot', 'contents_path'))\n" ]
[ "def __init__(self, fs, cfg):...\n", "self.fs = fs\n", "self.cfg = cfg\n", "self.tempfiles = {}\n", "self.filenames = {}\n", "self.newcount = 0\n", "self.init_honeyfs(self.cfg.get('honeypot', 'contents_path'))\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_19(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_58 = self.getfile(VAR_21)\n", "if VAR_58 != False:\n", "self.mkdir(VAR_21, 0, 0, 4096, 16877)\n" ]
[ "def mkdir2(self, path):...\n", "\"\"\"docstring\"\"\"\n", "dir = self.getfile(path)\n", "if dir != False:\n", "self.mkdir(path, 0, 0, 4096, 16877)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_43(self, VAR_41, VAR_43):...\n", "self[VAR_41:VAR_41 + 1] = VAR_43\n", "VAR_55 = len(VAR_43) - 1\n", "for VAR_40, (i, j) in self._names.items():\n", "if i > VAR_41:\n", "self._names[VAR_40] = i + VAR_55, j + VAR_55\n", "if i == VAR_41:\n", "self.set_name(VAR_40, i, VAR_42=i + len(items))\n" ...
[ "def insert_items(self, index, items):...\n", "self[index:index + 1] = items\n", "add = len(items) - 1\n", "for name, (i, j) in self._names.items():\n", "if i > index:\n", "self._names[name] = i + add, j + add\n", "if i == index:\n", "self.set_name(name, i, end=i + len(items))\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Condition", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_0(VAR_2):...\n", "VAR_6 = argparse.ArgumentParser(prog='md_browser')\n", "VAR_6.add_argument('-p', '--port', type=int, default=8080, help=\n 'port to run on (default = %(default)s)')\n", "VAR_6.add_argument('-d', '--directory', type=str, default=SRC_DIR)\n", "VAR_6.add_argument('-e', '--externa...
[ "def main(argv):...\n", "parser = argparse.ArgumentParser(prog='md_browser')\n", "parser.add_argument('-p', '--port', type=int, default=8080, help=\n 'port to run on (default = %(default)s)')\n", "parser.add_argument('-d', '--directory', type=str, default=SRC_DIR)\n", "parser.add_argument('-e', '--extern...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "AugAssign'", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Expr'", "Condition", "Expr'", "Assign'", ...
[ "@auth.require(acl.is_bot)...\n", "if VAR_9:\n", "VAR_51 = bot_code.get_bot_version(self.request.host_url)\n", "self.response.headers['Cache-Control'] = 'no-cache, no-store'\n", "if VAR_9 != VAR_51:\n", "self.response.headers['Content-Type'] = 'application/octet-stream'\n", "logging.error('Requested Swa...
[ "@auth.require(acl.is_bot)...\n", "if version:\n", "expected = bot_code.get_bot_version(self.request.host_url)\n", "self.response.headers['Cache-Control'] = 'no-cache, no-store'\n", "if version != expected:\n", "self.response.headers['Content-Type'] = 'application/octet-stream'\n", "logging.error('Reque...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@VAR_19.route('/test3')...\n", "return 'OK'\n" ]
[ "@test_views.route('/test3')...\n", "return 'OK'\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def __init__(self, *VAR_1, **VAR_2):...\n", "super(CLASS_0, self).__init__(*VAR_1, **kwargs)\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(FloatField, self).__init__(*args, **kwargs)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_4(VAR_9):...\n", "if VAR_9['exception']['TYPE'] == UnknownExtraConf.__name__:\n" ]
[ "def _RaiseExceptionForData(data):...\n", "if data['exception']['TYPE'] == UnknownExtraConf.__name__:\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_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_8(VAR_25, VAR_20, VAR_21, VAR_5=False, VAR_22=None, VAR_23=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_52 = [\n \"\"\"<collection><record>\n<controlfield tag=\"001\">%s</controlfield>\"\"\" %\n VAR_25]\n", "VAR_20 = VAR_20.items()\n", "VAR_21 = VAR_21.items()\n", "VAR_52.append(FUNC_9(VA...
[ "def build_marc(recid, single_keywords, composite_keywords, spires=False,...\n", "\"\"\"docstring\"\"\"\n", "output = [\n \"\"\"<collection><record>\n<controlfield tag=\"001\">%s</controlfield>\"\"\" %\n recid]\n", "single_keywords = single_keywords.items()\n", "composite_keywords = composite_keywords...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_1(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "if os.path.exists(VAR_1):\n", "return FUNC_0(VAR_1)[1]\n", "return {}\n" ]
[ "def load_yml_filedir(root_dir):...\n", "\"\"\"docstring\"\"\"\n", "if os.path.exists(root_dir):\n", "return _load_yml_filedir(root_dir)[1]\n", "return {}\n" ]
[ 0, 0, 1, 1, 1 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Return'" ]
[ "def FUNC_27(self, VAR_15):...\n", "" ]
[ "def add(self, item):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_6(self):...\n", "VAR_5 = Mock()\n", "VAR_5.sendmail.side_effect = lambda VAR_68: succeed(VAR_68)\n", "return VAR_5\n" ]
[ "def _create_mail_sender(self):...\n", "mail_sender = Mock()\n", "mail_sender.sendmail.side_effect = lambda mail: succeed(mail)\n", "return mail_sender\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_3, VAR_4, VAR_15=None, VAR_16=None):...\n", "CLASS_0.__init__(self, VAR_3, VAR_4)\n", "self.num_channels_label = VAR_15\n", "self.filter_input = VAR_16\n", "if self.filter_input:\n", "self.filter_input.textChanged.connect(self._on_filter_input_change)\n" ]
[ "def __init__(self, model, table_view, num_channels_label=None, filter_input...\n", "TriblerTableViewController.__init__(self, model, table_view)\n", "self.num_channels_label = num_channels_label\n", "self.filter_input = filter_input\n", "if self.filter_input:\n", "self.filter_input.textChanged.connect(se...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_0(VAR_0):...\n", "return os.stat(VAR_0, follow_symlinks=os.stat not in os.\n supports_follow_symlinks)\n" ]
[ "def lstat(f):...\n", "return os.stat(f, follow_symlinks=os.stat not in os.supports_follow_symlinks)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.format_wildcards(self.rule.shellcmd\n ) if self.rule.shellcmd else None\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.format_wildcards(self.rule.shellcmd\n ) if self.rule.shellcmd else None\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_15(self, VAR_21):...\n", "self.command('select ' + str(VAR_21), ['Target CPU', 'Core state',\n 'Debug entry cause'], 'Error selecting core')\n" ]
[ "def select_core(self, core):...\n", "self.command('select ' + str(core), ['Target CPU', 'Core state',\n 'Debug entry cause'], 'Error selecting core')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_2(VAR_3):...\n", "for dm in VAR_3:\n", "VAR_6 = getAlcoholByName(dm.text)\n", "if len(VAR_6) > 10:\n", "VAR_10 = (\n 'Sorry but I know a lot of alcohol with that in the name, could you be more specific?'\n )\n", "if VAR_6 == []:\n", "VAR_1.send_direct_message(screen_name=dm.sender_screen...
[ "def replyToUnansweredDMs(dms):...\n", "for dm in dms:\n", "results = getAlcoholByName(dm.text)\n", "if len(results) > 10:\n", "replyToDm = (\n 'Sorry but I know a lot of alcohol with that in the name, could you be more specific?'\n )\n", "if results == []:\n", "api.send_direct_message(screen_name...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "For", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_3():...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = {}\n", "for arg in request.args:\n", "VAR_8 = re.findall('_oc_(.*)', arg)\n", "return VAR_7\n", "if VAR_8:\n", "VAR_7[VAR_8[0]] = request.args.get(arg), request.args.get('_od_' + VAR_8[0])\n" ]
[ "def get_order_args():...\n", "\"\"\"docstring\"\"\"\n", "orders = {}\n", "for arg in request.args:\n", "re_match = re.findall('_oc_(.*)', arg)\n", "return orders\n", "if re_match:\n", "orders[re_match[0]] = request.args.get(arg), request.args.get('_od_' +\n re_match[0])\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 4 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'" ]
[ "def __init__(self, VAR_18, *VAR_15, **VAR_16):...\n", "CLASS_3.__init__(self, VAR_18, errors.WRONG_PASSWORD, *VAR_15, **kw)\n" ]
[ "def __init__(self, item, *a, **kw):...\n", "VRequired.__init__(self, item, errors.WRONG_PASSWORD, *a, **kw)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_17(VAR_5):...\n", "VAR_11 = VAR_5['children']\n", "if VAR_11:\n", "return itertools.chain.from_iterable([FUNC_17(child) for child in VAR_11])\n", "return VAR_5['id'],\n" ]
[ "def get_descendant_ids(node):...\n", "children = node['children']\n", "if children:\n", "return itertools.chain.from_iterable([get_descendant_ids(child) for child in\n children])\n", "return node['id'],\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_6(self, VAR_10, VAR_11):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def create_volume_from_snapshot(self, volume, snapshot):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def FUNC_2(self, VAR_8, VAR_9, VAR_10, VAR_5, VAR_11):...\n", "VAR_14 = 'string'.format(VAR_8, VAR_9, VAR_10, VAR_5, VAR_11)\n", "self.cur.execute(VAR_14)\n", "self.conn.commit()\n" ]
[ "def create_event(self, title, start_time, time_zone, server_id, description):...\n", "sql = (\n \"\"\"INSERT INTO events (title, start_time, time_zone, server_id, description)\n VALUES ('{0}', '{1}', '{2}', '{3}', '{4}')\n \"\"\"\n .format(title, start_time, time_zone, serve...
[ 0, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_5(self, VAR_16):...\n", "" ]
[ "def _get_context(self, name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_23(self):...\n", "if not self.final:\n", "VAR_76 = self.marks[0][1]\n", "return self.final\n", "VAR_77 = time.time() if len(self.marks) == 1 else self.marks[-1][1]\n", "VAR_78 = lambda VAR_76, VAR_77: int((VAR_77 - VAR_76) * 1000)\n", "VAR_79 = [(VAR_25, VAR_78(self.marks[i][1], ts)) for i, (V...
[ "def finish(self):...\n", "if not self.final:\n", "start = self.marks[0][1]\n", "return self.final\n", "end = time.time() if len(self.marks) == 1 else self.marks[-1][1]\n", "diff_ms = lambda start, end: int((end - start) * 1000)\n", "durations = [(name, diff_ms(self.marks[i][1], ts)) for i, (name, ts) i...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "import copy\n", "import logging\n", "import os\n", "import sflock\n", "from cuckoo.common.config import emit_options\n", "from cuckoo.common.exceptions import CuckooOperationalError\n", "from cuckoo.common.files import Folders, Files, Storage\n", "from cuckoo.common.utils import validate_url, validat...
[ "import copy\n", "import logging\n", "import os\n", "import sflock\n", "from cuckoo.common.config import emit_options\n", "from cuckoo.common.exceptions import CuckooOperationalError\n", "from cuckoo.common.files import Folders, Files, Storage\n", "from cuckoo.common.utils import validate_url, validat...
[ 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "FunctionDef'", "Condition", "Return'", "Condition", "Condition", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "...
[ "def FUNC_12(self, VAR_9, VAR_14):...\n", "super().validate(VAR_9, VAR_14)\n", "for VAR_18, part in enumerate(VAR_9):\n", "if isinstance(self.base_field, CLASS_0):\n", "self.base_field.validate(part, VAR_14)\n", "if len({len(i) for i in VAR_9}) > 1:\n" ]
[ "def validate(self, value, model_instance):...\n", "super().validate(value, model_instance)\n", "for index, part in enumerate(value):\n", "if isinstance(self.base_field, ArrayField):\n", "self.base_field.validate(part, model_instance)\n", "if len({len(i) for i in value}) > 1:\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "For", "Condition", "Expr'", "For" ]
[ "@api_post...\n", "VAR_7 = VAR_3.get('submit_id', 0)\n", "VAR_8 = VAR_3.get('password', None)\n", "VAR_9 = VAR_3.get('astree', True)\n", "VAR_6 = VAR_0.get_files(VAR_7=submit_id, VAR_8=password, VAR_9=astree)\n", "return JsonResponse({'status': True, 'data': VAR_6, 'defaults': FUNC_0()},\n encoder=Json...
[ "@api_post...\n", "submit_id = body.get('submit_id', 0)\n", "password = body.get('password', None)\n", "astree = body.get('astree', True)\n", "data = submit_manager.get_files(submit_id=submit_id, password=password,\n astree=astree)\n", "return JsonResponse({'status': True, 'data': data, 'defaults': def...
[ 0, 0, 0, 0, 1, 1 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_17(VAR_22, VAR_5=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_59 = {}\n", "if VAR_22:\n", "for VAR_96, VAR_63 in VAR_22.items():\n", "return VAR_59\n", "VAR_32 = VAR_63[0]\n", "VAR_33 = VAR_63[1]\n", "VAR_92 = []\n", "for VAR_94, spans in VAR_33.items():\n", "VAR_92.append(VAR_94.out...
[ "def _get_author_keywords(author_keywords, spires=False):...\n", "\"\"\"docstring\"\"\"\n", "out = {}\n", "if author_keywords:\n", "for keyword, matches in author_keywords.items():\n", "return out\n", "skw_matches = matches[0]\n", "ckw_matches = matches[1]\n", "matches_str = []\n", "for ckw, spans...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "For", "Return'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "For", "Expr'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_3(self):...\n", "VAR_1 = VAR_0.copy()\n", "VAR_2 = self._get(VAR_1)\n", "self.assertEqual(VAR_2.status_code, 302)\n", "self.assertEqual(User.objects.count(), 2)\n", "VAR_3 = User.objects.get(username='teekkarit@aalto.fi')\n", "self.assertEqual(VAR_3.email, '{:d}@localhost'.format(VAR_3.id))\n"...
[ "def test_without_email(self):...\n", "meta = DEF_SHIBD_META.copy()\n", "response = self._get(meta)\n", "self.assertEqual(response.status_code, 302)\n", "self.assertEqual(User.objects.count(), 2)\n", "user = User.objects.get(username='teekkarit@aalto.fi')\n", "self.assertEqual(user.email, '{:d}@localhos...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_15(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_14 = block.sys_block_path(VAR_1)\n", "VAR_27 = os.listdir(os.path.join(VAR_14, 'holders'))\n", "LOG.debug(\"devname '%s' had holders: %s\", VAR_1, VAR_27)\n", "return VAR_27\n" ]
[ "def get_holders(device):...\n", "\"\"\"docstring\"\"\"\n", "sysfs_path = block.sys_block_path(device)\n", "holders = os.listdir(os.path.join(sysfs_path, 'holders'))\n", "LOG.debug(\"devname '%s' had holders: %s\", device, holders)\n", "return holders\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_1(self, VAR_1, VAR_2, VAR_5, VAR_6, VAR_4={}):...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = self.pool.get('stock.location')\n", "VAR_23 = self.pool.get('account.move')\n", "VAR_24 = self.pool.get('account.move.line')\n", "VAR_25 = VAR_6.get('new_price', 0.0)\n", "VAR_19 = VAR_6.get('stock_outpu...
[ "def do_change_standard_price(self, cr, uid, ids, datas, context={}):...\n", "\"\"\"docstring\"\"\"\n", "location_obj = self.pool.get('stock.location')\n", "move_obj = self.pool.get('account.move')\n", "move_line_obj = self.pool.get('account.move.line')\n", "new_price = datas.get('new_price', 0.0)\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "For", "For", "Return'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Condit...
[ "def FUNC_5(self, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = VAR_6()\n", "if VAR_5.categories:\n", "VAR_8['categories'] = []\n", "if VAR_5.actions:\n", "VAR_8['actions'] = []\n", "if VAR_5.links:\n", "VAR_8['links'] = []\n", "if VAR_5.attributes:\n", "VAR_8['attributes'] = VAR_6()\n", ...
[ "def _json_obj(self, obj):...\n", "\"\"\"docstring\"\"\"\n", "json_obj = OrderedDict()\n", "if obj.categories:\n", "json_obj['categories'] = []\n", "if obj.actions:\n", "json_obj['actions'] = []\n", "if obj.links:\n", "json_obj['links'] = []\n", "if obj.attributes:\n", "json_obj['attributes'] = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "For", "Assign'", "For", "Assign'", "Assign'", "For", "Assign'", "Condition", "Assign'", "For", "Assign'", "...
[ "def FUNC_2(self):...\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen('url', max_tries=-1), None)\n", "self._mox.VerifyAll()\n" ]
[ "def testUrlOpenInvalidTryCount(self):...\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen('url', max_tries=-1), None)\n", "self._mox.VerifyAll()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'" ]
[ "def __call__(self):...\n", "return self\n" ]
[ "def __call__(self):...\n", "return self\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = subprocess.Popen(['nmcli', 'connection', 'delete', 'id', VAR_6],\n stdout=subprocess.PIPE)\n", "print(VAR_8)\n" ]
[ "def delete_WifiConn(wifiap):...\n", "\"\"\"docstring\"\"\"\n", "ps = subprocess.Popen(['nmcli', 'connection', 'delete', 'id', wifiap],\n stdout=subprocess.PIPE)\n", "print(ps)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "@click.command(help='Add a new monitor')...\n", "if VAR_6:\n", "VAR_7 = True\n", "VAR_23, VAR_30, VAR_12 = newrelic.create_monitor(VAR_0.obj['ACCOUNT'],\n VAR_1, VAR_2, VAR_4, VAR_3, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9, VAR_10)\n", "if VAR_11:\n", "print(json.dumps(VAR_12))\n", "if VAR_23 == 0:\n", ...
[ "@click.command(help='Add a new monitor')...\n", "if validation_string:\n", "bypass_head_request = True\n", "status, message, monitor = newrelic.create_monitor(ctx.obj['ACCOUNT'], name,\n uri, frequency, location, email, validation_string, bypass_head_request,\n verify_ssl, redirect_is_failure, sla_thre...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Return'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_23):...\n", "if VAR_23 and self.r_css_name.match(VAR_23):\n", "return VAR_23\n" ]
[ "def run(self, name):...\n", "if name and self.r_css_name.match(name):\n", "return name\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "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.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 FUNC_18(VAR_26):...\n", "VAR_56 = VAR_2.match(VAR_26)\n", "if not VAR_56:\n", "VAR_57, VAR_58 = VAR_56.groups()\n", "VAR_59 = datetime.strptime(VAR_57, '%Y-%m-%d')\n", "return VAR_59, int(VAR_58)\n" ]
[ "def decode_part_str(part_str):...\n", "match = PART_RE.match(part_str)\n", "if not match:\n", "date_str, retention_days = match.groups()\n", "date = datetime.strptime(date_str, '%Y-%m-%d')\n", "return date, int(retention_days)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_3=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_3 is None:\n", "VAR_3 = sys.argv\n", "VAR_4 = VAR_3[0]\n", "VAR_4 = VAR_3[0]\n", "VAR_3 = VAR_3[1:]\n", "if VAR_4 == __file__:\n", "VAR_11, VAR_12, VAR_13 = FUNC_1(VAR_3)\n", "VAR_4 = '{} -m ptvsd'.format(os.path.basename(sys.execu...
[ "def parse_args(argv=None):...\n", "\"\"\"docstring\"\"\"\n", "if argv is None:\n", "argv = sys.argv\n", "prog = argv[0]\n", "prog = argv[0]\n", "argv = argv[1:]\n", "if prog == __file__:\n", "supported, pydevd, script = _group_args(argv)\n", "prog = '{} -m ptvsd'.format(os.path.basename(sys.execu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "AugAssign'", "Return'" ]