lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_36(self, VAR_29):...\n", "VAR_6.assertEqual('Too bad', VAR_29.message)\n", "VAR_12.append('authentication_error')\n", "super(CLASS_7, self).authentication_error(VAR_29)\n" ]
[ "def authentication_error(self, err):...\n", "test.assertEqual('Too bad', err.message)\n", "calls.append('authentication_error')\n", "super(Handler, self).authentication_error(err)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'" ]
[ "import json\n", "import os\n", "import time\n", "import urllib\n", "import psycopg2\n", "from websocket import create_connection\n", "import config\n", "VAR_0 = create_connection(config.WEBSOCKET_URL)\n", "VAR_1 = psycopg2.connect(**config.POSTGRES)\n", "VAR_2 = VAR_1.cursor()\n", "VAR_3 = 'TRU...
[ "import json\n", "import os\n", "import time\n", "import urllib\n", "import psycopg2\n", "from websocket import create_connection\n", "import config\n", "ws = create_connection(config.WEBSOCKET_URL)\n", "con = psycopg2.connect(**config.POSTGRES)\n", "cur = con.cursor()\n", "query = 'TRUNCATE hol...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Ex...
[ "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_13(self, VAR_14):...\n", "return [CLASS_2(None, VAR_14, self)]\n" ]
[ "def flatten(self, name):...\n", "return [FlattenedColumn(None, name, self)]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(VAR_4):...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = VAR_4.lower().strip()\n", "FUNC_3(VAR_10)\n" ]
[ "def process(input):...\n", "\"\"\"docstring\"\"\"\n", "_input = input.lower().strip()\n", "check_sub_command(_input)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def __repr__(self):...\n", "return '<%s: %s>' % (self.__class__.__name__, self)\n" ]
[ "def __repr__(self):...\n", "return '<%s: %s>' % (self.__class__.__name__, self)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@auth.require(acl.is_ereporter2_editor)...\n", "VAR_19 = self.request.get('to_delete')\n", "if VAR_19:\n", "ndb.Key(models.ErrorReportingMonitoring, VAR_19).delete()\n", "VAR_33 = self.request.get('mute_type')\n", "self.get()\n", "VAR_17 = None\n", "if VAR_33 in ('exception_type', 'signature'):\n", ...
[ "@auth.require(acl.is_ereporter2_editor)...\n", "to_delete = self.request.get('to_delete')\n", "if to_delete:\n", "ndb.Key(models.ErrorReportingMonitoring, to_delete).delete()\n", "mute_type = self.request.get('mute_type')\n", "self.get()\n", "error = None\n", "if mute_type in ('exception_type', 'sign...
[ 0, 0, 0, 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", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Assign'"...
[ "def FUNC_3(self):...\n", "VAR_0.persistConfig(self.get_argument('AudioCodec'), self.get_argument(\n 'AudioRate'), self.get_argument('VideoCodec'), self.get_argument(\n 'VideoRate'), self.get_argument('VideoSize'), self.get_argument(\n 'StreamEncryption'), self.get_argument('GenEncryptionKey'))\n", "se...
[ "def post(self):...\n", "cfgDAO.persistConfig(self.get_argument('AudioCodec'), self.get_argument(\n 'AudioRate'), self.get_argument('VideoCodec'), self.get_argument(\n 'VideoRate'), self.get_argument('VideoSize'), self.get_argument(\n 'StreamEncryption'), self.get_argument('GenEncryptionKey'))\n", "sel...
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "@api_view(['GET'])...\n", "VAR_13 = VAR_0.query_params.get('measure', None)\n", "VAR_12, VAR_2 = FUNC_1(VAR_0)\n", "VAR_14 = ImportLog.objects.latest_in_category('prescribing').current_at\n", "VAR_15 = (VAR_14 - relativedelta(months=2)).strftime('%Y-%m-01')\n", "VAR_16 = Measure.objects.get(pk=measure)\n...
[ "@api_view(['GET'])...\n", "measure = request.query_params.get('measure', None)\n", "org_id, org_type = _get_org_id_and_type_from_request(request)\n", "this_month = ImportLog.objects.latest_in_category('prescribing').current_at\n", "three_months_ago = (this_month - relativedelta(months=2)).strftime('%Y-%m-0...
[ 0, 0, 4, 0, 0, 0, 0, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4, 0, 4, 0, 0, 4, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "For", "Assign'", "Assign'", "Assign'", "Return'", "Assign'", "Assign'", ...
[ "def __init__(self, VAR_18, VAR_35=10000, VAR_36=errors.BAD_COMMENT, VAR_37=...\n", "CLASS_0.__init__(self, VAR_18, **kw)\n", "self.length = VAR_35\n", "self.len_error = VAR_37\n", "self.emp_error = VAR_36\n" ]
[ "def __init__(self, item, length=10000, empty_error=errors.BAD_COMMENT,...\n", "Validator.__init__(self, item, **kw)\n", "self.length = length\n", "self.len_error = length_error\n", "self.emp_error = empty_error\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_5(self, VAR_11='', VAR_6=None):...\n", "VAR_5 = self.session.query(self.obj)\n", "VAR_5 = self._get_base_query(VAR_5=query, VAR_6=filters)\n", "VAR_25 = VAR_5.all()\n", "VAR_26 = GroupByDateMonth(VAR_11, 'Group by Month')\n", "return VAR_26.apply(VAR_25)\n" ]
[ "def query_month_group(self, group_by='', filters=None):...\n", "query = self.session.query(self.obj)\n", "query = self._get_base_query(query=query, filters=filters)\n", "query_result = query.all()\n", "group = GroupByDateMonth(group_by, 'Group by Month')\n", "return group.apply(query_result)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "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_16(self, VAR_15):...\n", "\"\"\"docstring\"\"\"\n", "for o in self.products:\n", "if o.match(VAR_15):\n", "return False\n", "return True\n" ]
[ "def is_producer(self, requested_output):...\n", "\"\"\"docstring\"\"\"\n", "for o in self.products:\n", "if o.match(requested_output):\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Return'", "Return'" ]
[ "import logging\n", "import re\n", "from grokcore.component import Adapter, implements, baseclass\n", "from zope.interface import Interface\n", "from opennode.oms.model.model.symlink import follow_symlinks\n", "__all__ = ['traverse_path', 'traverse1']\n", "VAR_0 = logging.getLogger(__name__)\n", "\"\"...
[ "import logging\n", "import re\n", "from grokcore.component import Adapter, implements, baseclass\n", "from zope.interface import Interface\n", "from opennode.oms.model.model.symlink import follow_symlinks\n", "__all__ = ['traverse_path', 'traverse1']\n", "log = logging.getLogger(__name__)\n", "\"\"\"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assig...
[ "def FUNC_4(self, VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = {}\n", "VAR_5['volumeName'] = VAR_9\n", "VAR_18 = self._cliq_run_xml('getVolumeInfo', VAR_5)\n", "VAR_23 = {}\n", "VAR_24 = VAR_18.find('response/volume')\n", "for VAR_43, v in VAR_24.attrib.items():\n", "VAR_23['volume.' + VAR_43]...
[ "def _cliq_get_volume_info(self, volume_name):...\n", "\"\"\"docstring\"\"\"\n", "cliq_args = {}\n", "cliq_args['volumeName'] = volume_name\n", "result_xml = self._cliq_run_xml('getVolumeInfo', cliq_args)\n", "volume_attributes = {}\n", "volume_node = result_xml.find('response/volume')\n", "for k, v i...
[ 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'", "For", "Assign'", "Assign'", "Condition", "For", "Assign'", "Assign'", "Condition", "For", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_16(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1.value = beamr.interpreters.Text(VAR_1.value)\n", "return VAR_1\n" ]
[ "def t_TEXT(t):...\n", "\"\"\"docstring\"\"\"\n", "t.value = beamr.interpreters.Text(t.value)\n", "return t\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_21(self):...\n", "\"\"\"docstring\"\"\"\n", "tournament.registerPlayer(VAR_1='J!mes Dean')\n" ]
[ "def test_name_contains_symbols(self):...\n", "\"\"\"docstring\"\"\"\n", "tournament.registerPlayer(player_name='J!mes Dean')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_11(self):...\n", "\"\"\"docstring\"\"\"\n", "self.response.headers['Strict-Transport-Security'\n ] = 'max-age=2592000; includeSubdomains'\n", "self.response.headers['X-Content-Type-Options'] = 'nosniff'\n", "self.response.headers['X-Frame-Options'] = 'deny'\n" ]
[ "def _add_security_response_headers(self):...\n", "\"\"\"docstring\"\"\"\n", "self.response.headers['Strict-Transport-Security'\n ] = 'max-age=2592000; includeSubdomains'\n", "self.response.headers['X-Content-Type-Options'] = 'nosniff'\n", "self.response.headers['X-Frame-Options'] = 'deny'\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_14(self, VAR_23):...\n", "VAR_23.insert(0, b'')\n", "self.wz_sock.send_multipart(VAR_23)\n" ]
[ "def send_to_router(self, msg):...\n", "msg.insert(0, b'')\n", "self.wz_sock.send_multipart(msg)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_16(self, VAR_27: int):...\n", "\"\"\"docstring\"\"\"\n", "VAR_35 = License.get_by_id(VAR_27)\n", "if VAR_35 in self.accepted_licenses:\n", "return True\n", "return False\n" ]
[ "def has_user_accepted_licence(self, license_id: int):...\n", "\"\"\"docstring\"\"\"\n", "image_license = License.get_by_id(license_id)\n", "if image_license in self.accepted_licenses:\n", "return True\n", "return False\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_18(self):...\n", "self._test_strtype('blob', None, 100)\n" ]
[ "def test_null_blob(self):...\n", "self._test_strtype('blob', None, 100)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_5(VAR_3, VAR_10, VAR_2):...\n", "if '%(key)s' in VAR_3:\n", "VAR_3 = VAR_3.replace('%(key)s', VAR_10)\n", "if '%s' in VAR_3:\n", "VAR_3 = VAR_3.replace('%s', (VAR_2 or '') + '%')\n", "return VAR_3\n" ]
[ "def scrub_custom_query(query, key, txt):...\n", "if '%(key)s' in query:\n", "query = query.replace('%(key)s', key)\n", "if '%s' in query:\n", "query = query.replace('%s', (txt or '') + '%')\n", "return query\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_4():...\n", "if VAR_9 in VAR_1:\n", "VAR_1.remove(VAR_9)\n", "print('Directory does not exist.')\n", "if VAR_9 in VAR_2:\n", "VAR_2.remove(VAR_9)\n" ]
[ "def rm():...\n", "if dir in dirs:\n", "dirs.remove(dir)\n", "print('Directory does not exist.')\n", "if dir in path:\n", "path.remove(dir)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "from django.conf import settings\n", "from django.test import TransactionTestCase\n", "from scheduler import chaos\n", "\"\"\"Tests creati...
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "from django.conf import settings\n", "from django.test import TransactionTestCase\n", "from scheduler import chaos\n", "\"\"\"Tests creati...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Expr'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Expr...
[ "def FUNC_30(self, VAR_16):...\n", "" ]
[ "def delete_all(self, items):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_8(self):...\n", "VAR_7 = f'/datagroup/{DataGroup.objects.first().id}/'\n", "VAR_2 = self.client.get(VAR_7).content.decode('utf8')\n", "VAR_8 = '<span class=\"oi oi-trash\"></span>'\n", "self.assertIn(VAR_8, VAR_2, 'Trash button should be present if not matched.')\n", "self.objects.doc.matched = ...
[ "def test_delete_doc_button(self):...\n", "url = f'/datagroup/{DataGroup.objects.first().id}/'\n", "response = self.client.get(url).content.decode('utf8')\n", "span = '<span class=\"oi oi-trash\"></span>'\n", "self.assertIn(span, response, 'Trash button should be present if not matched.')\n", "self.object...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_0(self, VAR_1, VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_17 = self.pool.get('product.product').browse(VAR_1, VAR_2, VAR_3, VAR_4\n =context)\n", "VAR_18 = (VAR_17.property_stock_account_input and VAR_17.\n property_stock_accoun...
[ "def get_product_accounts(self, cr, uid, product_id, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "product_obj = self.pool.get('product.product').browse(cr, uid, product_id,\n context=context)\n", "stock_input_acc = (product_obj.property_stock_account_inpu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@login_required...\n", "" ]
[ "@login_required...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_4(self, VAR_4):...\n", "VAR_6 = 'SELECT COUNT(rno) FROM rides WHERE rno = {rno}'.format(VAR_4=rno)\n", "self.cursor.execute(VAR_6)\n", "VAR_9 = self.cursor.fetchone()\n", "if int(VAR_9[0]) > 0:\n", "return True\n", "return False\n" ]
[ "def verify_rno(self, rno):...\n", "query = 'SELECT COUNT(rno) FROM rides WHERE rno = {rno}'.format(rno=rno)\n", "self.cursor.execute(query)\n", "result = self.cursor.fetchone()\n", "if int(result[0]) > 0:\n", "return True\n", "return False\n" ]
[ 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_3(self, VAR_4, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_8 = self.add_outstanding_query(VAR_3)\n", "VAR_10 = self.dump_session_cookie(VAR_8)\n", "VAR_11 = auth_response(VAR_8, VAR_4)\n", "VAR_24 = self.app.dispatch_request()\n", "VAR_10 = VAR_24.headers['Set-Cookie']\n", "return VAR_10\...
[ "def login(self, eppn, came_from):...\n", "\"\"\"docstring\"\"\"\n", "session_id = self.add_outstanding_query(came_from)\n", "cookie = self.dump_session_cookie(session_id)\n", "saml_response = auth_response(session_id, eppn)\n", "response1 = self.app.dispatch_request()\n", "cookie = response1.headers['S...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "import datetime\n", "import os\n", "import os.path\n", "import urlparse\n", "import socket\n", "from time import localtime, strftime, time\n", "from requests.exceptions import RequestException, ConnectionError, Timeout\n", "import requests\n", "import yaml\n", "from monitoring_config_generator.ex...
[ "import datetime\n", "import os\n", "import os.path\n", "import urlparse\n", "import socket\n", "from time import localtime, strftime, time\n", "from requests.exceptions import RequestException, ConnectionError, Timeout\n", "import requests\n", "import yaml\n", "from monitoring_config_generator.ex...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Return'" ]
[ "def __getattr__(self, VAR_8):...\n", "if self._r_item_ is VAR_0:\n", "if not self._r_via_alternate_lookup_:\n", "VAR_28 = CLASS_3(self)\n", "self._r_path_.log_getattr(VAR_8, self)\n", "return self\n", "if self._r_is_multi_item_:\n", "VAR_33 = []\n", "VAR_28._r_item_ = getattr(VAR_28._r_item_, VAR_8...
[ "def __getattr__(self, attr_name):...\n", "if self._r_item_ is MISSING:\n", "if not self._r_via_alternate_lookup_:\n", "copy = Roamer(self)\n", "self._r_path_.log_getattr(attr_name, self)\n", "return self\n", "if self._r_is_multi_item_:\n", "multi_items = []\n", "copy._r_item_ = getattr(copy._r_item...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Assign'", "Expr'", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "For", "Condition", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Return'", "Assign'", "Condition...
[ "@Endpoint('GET', '/clusters')...\n", "return Ganesha.get_ganesha_clusters()\n" ]
[ "@Endpoint('GET', '/clusters')...\n", "return Ganesha.get_ganesha_clusters()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@VAR_5.setter...\n", "self._benchmark = IOFile(VAR_5, VAR_16=self)\n" ]
[ "@benchmark.setter...\n", "self._benchmark = IOFile(benchmark, rule=self)\n" ]
[ 0, 0 ]
[ "Condition", "Assign'" ]
[ "def FUNC_12(self, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "VAR_28 = ['volume', 'create', VAR_16['name'], '%sG' % VAR_16['size']]\n", "VAR_0.error(_('Failed to create volume %s'), VAR_16['name'])\n", "if self.configuration.eqlx_pool != 'default':\n", "VAR_28.append('pool')\n", "if self.configuration....
[ "def create_volume(self, volume):...\n", "\"\"\"docstring\"\"\"\n", "cmd = ['volume', 'create', volume['name'], '%sG' % volume['size']]\n", "LOG.error(_('Failed to create volume %s'), volume['name'])\n", "if self.configuration.eqlx_pool != 'default':\n", "cmd.append('pool')\n", "if self.configuration.sa...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "Return'" ]
[ "@integration_synonym_api...\n", "FUNC_2(VAR_2)\n", "FUNC_3(VAR_2, 'KRYSTAL', VAR_7='1')\n", "FUNC_5(VAR_4, VAR_5, VAR_11='CHRISTAL', VAR_10=[{'name': '----CHRISTAL'}, {\n 'name': 'KRYSTAL'}])\n" ]
[ "@integration_synonym_api...\n", "clean_database(solr)\n", "seed_database_with(solr, 'KRYSTAL', id='1')\n", "verify_results(client, jwt, query='CHRISTAL', expected=[{'name':\n '----CHRISTAL'}, {'name': 'KRYSTAL'}])\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_17(self, VAR_3, VAR_4, VAR_12=True, VAR_11=None):...\n", "\"\"\"docstring\"\"\"\n", "return self.__make_proxy('make_target_proxy', VAR_3, (VAR_4,), dict(VAR_12=\n manage_back_references, VAR_11=options))\n" ]
[ "def make_target_proxy(self, data, accessor, manage_back_references=True,...\n", "\"\"\"docstring\"\"\"\n", "return self.__make_proxy('make_target_proxy', data, (accessor,), dict(\n manage_back_references=manage_back_references, options=options))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_13(self, VAR_12, VAR_13, VAR_14=None):...\n", "\"\"\"docstring\"\"\"\n", "assert VAR_14 is None or (VAR_13 is None or VAR_14 >= VAR_23(VAR_13))\n", "if VAR_14:\n", "VAR_37 = 'create table t1(s %s(%s))' % (VAR_12, VAR_14)\n", "VAR_37 = 'create table t1(s %s)' % VAR_12\n", "self.cursor.execute(V...
[ "def _test_strliketype(self, sqltype, value, colsize=None):...\n", "\"\"\"docstring\"\"\"\n", "assert colsize is None or (value is None or colsize >= len(value))\n", "if colsize:\n", "sql = 'create table t1(s %s(%s))' % (sqltype, colsize)\n", "sql = 'create table t1(s %s)' % sqltype\n", "self.cursor.exe...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Condition", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_7=None, VAR_8=None, VAR_9=True, VAR_10=True, VAR_11=True...\n", "if VAR_7:\n", "self.param = VAR_7\n", "self.param = self.default_param\n", "self.default = VAR_8\n", "self.post, self.get, self.url = VAR_9, VAR_10, VAR_11\n" ]
[ "def __init__(self, param=None, default=None, post=True, get=True, url=True):...\n", "if param:\n", "self.param = param\n", "self.param = self.default_param\n", "self.default = default\n", "self.post, self.get, self.url = post, get, url\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_7(self):...\n", "self.container.destroy()\n" ]
[ "def destroy_container(self):...\n", "self.container.destroy()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@rest_utils.ajax()...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = VAR_1.GET.get('detailed') == 'true'\n", "VAR_10 = api.nova.availability_zone_list(VAR_1, VAR_11)\n", "return {'items': [u.to_dict() for u in VAR_10]}\n" ]
[ "@rest_utils.ajax()...\n", "\"\"\"docstring\"\"\"\n", "detailed = request.GET.get('detailed') == 'true'\n", "result = api.nova.availability_zone_list(request, detailed)\n", "return {'items': [u.to_dict() for u in result]}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_26(VAR_20=None):...\n", "return json.loads(VAR_7.get('/request', VAR_20=headers).body)\n" ]
[ "def call(headers=None):...\n", "return json.loads(app.get('/request', headers=headers).body)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_23(self, VAR_21, VAR_27, VAR_28):...\n", "\"\"\"docstring\"\"\"\n", "VAR_57 = self.getfile(VAR_21)\n", "if VAR_57 == False:\n", "if VAR_27 != -1:\n", "VAR_57[VAR_3] = VAR_27\n", "if VAR_28 != -1:\n", "VAR_57[VAR_4] = VAR_28\n" ]
[ "def chown(self, path, uid, gid):...\n", "\"\"\"docstring\"\"\"\n", "p = self.getfile(path)\n", "if p == False:\n", "if uid != -1:\n", "p[A_UID] = uid\n", "if gid != -1:\n", "p[A_GID] = gid\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'" ]
[ "\"\"\"string\"\"\"\n", "import re\n", "from lib.core.data import conf\n", "from lib.core.settings import MATCH_RATIO\n", "def FUNC_0(VAR_0, VAR_1=None, VAR_2=False):...\n", "VAR_3 = None\n", "if conf.eString and conf.eString in VAR_0:\n", "VAR_4 = VAR_0.index(conf.eString)\n", "if conf.eRegexp:\n",...
[ "\"\"\"\n$Id$\n\nThis file is part of the sqlmap project, http://sqlmap.sourceforge.net.\n\nCopyright (c) 2006-2008 Bernardo Damele A. G. <bernardo.damele@gmail.com>\n and Daniele Bellucci <daniele.bellucci@gmail.com>\n\nsqlmap is free software; you can redistribute it and/or modify it under\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Condition", "AugAssign'", "For", "Return'", "Return'", "Condition", "Expr'", "Assign'...
[ "def FUNC_4(self):...\n", "return {'email': 'unauthenticated user', 'first_name': 'unauthenticated',\n 'last_name': 'user'}\n" ]
[ "def current_user(self):...\n", "return {'email': 'unauthenticated user', 'first_name': 'unauthenticated',\n 'last_name': 'user'}\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_13(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 2\n", "VAR_10 = 'string'.format(repo_dir=REPO_DIR, shard_str='/shard_' + self.\n shard if self.shard else '', procs=process_count)\n", "VAR_7 = BokChoyTestSuite('', num_processes=process_count)\n", "self.assertEqual(BokChoyTestSuite.verbos...
[ "def test_verbosity_settings_2_processes(self):...\n", "\"\"\"docstring\"\"\"\n", "process_count = 2\n", "expected_verbosity_string = (\n '--with-xunitmp --xunitmp-file={repo_dir}/reports/bok_choy{shard_str}/xunit.xml --processes={procs} --no-color --process-timeout=1200'\n .format(repo_dir=REPO_DIR, sh...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "import psycopg2\n", "def FUNC_0(VAR_0, VAR_1, VAR_2):...\n", "VAR_3 = psycopg2.connect(database=dbname, user=uname, password=psw, host=\n '127.0.0.1', port='5432')\n", "return VAR_3\n" ]
[ "import psycopg2\n", "def connectDB(dbname, uname, psw):...\n", "conn = psycopg2.connect(database=dbname, user=uname, password=psw, host=\n '127.0.0.1', port='5432')\n", "return conn\n" ]
[ 0, 0, 0, 0 ]
[ "Import'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_7():...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = FUNC_0()\n", "VAR_4 = VAR_3.cursor()\n", "VAR_5 = 'players'\n", "VAR_4.execute('string' % (VAR_5,))\n", "VAR_7 = VAR_4.fetchall()\n", "VAR_8 = list()\n", "if VAR_7 % 2 != 0:\n", "return None\n", "for i in range(0, len(VAR_7), 2):\n", "V...
[ "def swissPairings():...\n", "\"\"\"docstring\"\"\"\n", "conn = connect()\n", "c = conn.cursor()\n", "table = 'players'\n", "c.execute(\n \"\"\"SELECT playerID, \n playerName FROM %s ORDER BY wins DESC;\"\"\"\n % (table,))\n", "resu...
[ 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "Return'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_9(self, VAR_12):...\n", "print('Test type: %s' % self.__class__.__name__, file=fd)\n", "print('Execution start time: %s' % datetime.datetime.fromtimestamp(self.\n start_time).strftime('%d/%m/%Y %H:%M:%S.%f'), file=fd)\n", "print('Execution stop time: %s' % datetime.datetime.fromtimestamp(self.\n ...
[ "def store_to_file(self, fd):...\n", "print('Test type: %s' % self.__class__.__name__, file=fd)\n", "print('Execution start time: %s' % datetime.datetime.fromtimestamp(self.\n start_time).strftime('%d/%m/%Y %H:%M:%S.%f'), file=fd)\n", "print('Execution stop time: %s' % datetime.datetime.fromtimestamp(self....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'" ]
[ "@VAR_1.route('/callback/<provider>')...\n", "VAR_15 = OAuthSignIn.get_provider(VAR_7)\n", "VAR_16, VAR_17, VAR_12 = VAR_15.callback()\n", "if VAR_16 is None:\n", "flash('Authentication failed.')\n", "VAR_13 = query_social_user(VAR_16)\n", "return redirect(url_for('login'))\n", "VAR_18['social'] = VAR...
[ "@app.route('/callback/<provider>')...\n", "oauth = OAuthSignIn.get_provider(provider)\n", "social, username, email = oauth.callback()\n", "if social is None:\n", "flash('Authentication failed.')\n", "user = query_social_user(social)\n", "return redirect(url_for('login'))\n", "session['social'] = soci...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def __getitem__(self, VAR_44):...\n", "" ]
[ "def __getitem__(self, key):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "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 __init__(self, VAR_7=None, VAR_8=None, VAR_9=True, VAR_10=True, VAR_11=True...\n", "if VAR_7:\n", "self.param = VAR_7\n", "self.param = self.default_param\n", "self.default = VAR_8\n", "self.post, self.get, self.url = VAR_9, VAR_10, VAR_11\n" ]
[ "def __init__(self, param=None, default=None, post=True, get=True, url=True):...\n", "if param:\n", "self.param = param\n", "self.param = self.default_param\n", "self.default = default\n", "self.post, self.get, self.url = post, get, url\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_11(self):...\n", "\"\"\"docstring\"\"\"\n", "if len(self.tables) > 1:\n", "for VAR_74, VAR_34 in enumerate(self.fields):\n", "if '.' not in VAR_34:\n", "self.fields[VAR_74] = '{0}.{1}'.format(self.tables[0], VAR_34)\n" ]
[ "def set_field_tables(self):...\n", "\"\"\"docstring\"\"\"\n", "if len(self.tables) > 1:\n", "for i, f in enumerate(self.fields):\n", "if '.' not in f:\n", "self.fields[i] = '{0}.{1}'.format(self.tables[0], f)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "For", "Condition", "Assign'" ]
[ "import os\n", "import os.path\n", "import json\n", "import sys\n", "import yaml\n", "def FUNC_0(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = '.yml'\n", "VAR_3 = os.path.basename(VAR_0)\n", "if os.path.isdir(VAR_0):\n", "VAR_4 = {}\n", "if os.path.isfile(VAR_0):\n", "for entry in os.li...
[ "import os\n", "import os.path\n", "import json\n", "import sys\n", "import yaml\n", "def _load_yml_filedir(path):...\n", "\"\"\"docstring\"\"\"\n", "YML_FILE_SUFFIX = '.yml'\n", "bpath = os.path.basename(path)\n", "if os.path.isdir(path):\n", "result = {}\n", "if os.path.isfile(path):\n", "...
[ 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, 1, 1, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "For", "Condition", "FunctionDef'", "Assign'", "Return'", "Return'", "Condition", "Docstring", "Assign'", "Assign'", "Return'", ...
[ "def __init__(self, *VAR_3, **VAR_4):...\n", "VAR_11 = VAR_4.pop('execute', self.san_execute)\n", "super(CLASS_0, self).__init__(*VAR_3, VAR_11=execute, **kwargs)\n", "self.configuration.append_config_values(VAR_1)\n", "self.run_local = self.configuration.san_is_local\n", "self.sshpool = None\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "execute = kwargs.pop('execute', self.san_execute)\n", "super(SanDriver, self).__init__(*args, execute=execute, **kwargs)\n", "self.configuration.append_config_values(san_opts)\n", "self.run_local = self.configuration.san_is_local\n", "self.sshpool = None\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "return FUNC_0(self.request, self.request.user)\n" ]
[ "def get_redirect_url(self):...\n", "\"\"\"docstring\"\"\"\n", "return find_nextlocation(self.request, self.request.user)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_1 = list(self.uut.process_output(['1.0|0: Info message\\n',\n '2.2|1: Normal message\\n', \"\"\"3.4|2: Major message\n\"\"\"], 'a/file.py', [\n 'original_file_lines_placeholder']))\n", "self.assertEqual(len(VAR_1), 3)\n", "self.assertEqual(VAR_1[0].origin, 'Lint')\n", "s...
[ "def test_invalid_output(self):...\n", "out = list(self.uut.process_output(['1.0|0: Info message\\n',\n '2.2|1: Normal message\\n', \"\"\"3.4|2: Major message\n\"\"\"], 'a/file.py', [\n 'original_file_lines_placeholder']))\n", "self.assertEqual(len(out), 3)\n", "self.assertEqual(out[0].origin, 'Lint')\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_2():...\n", "VAR_16 = InputMail()\n", "VAR_16.fdoc = CLASS_0({})\n", "VAR_16._chash = '123'\n", "VAR_16.as_dict = lambda : None\n", "return VAR_16\n" ]
[ "def input_mail():...\n", "mail = InputMail()\n", "mail.fdoc = TestDoc({})\n", "mail._chash = '123'\n", "mail.as_dict = lambda : None\n", "return mail\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "from django.db import models, migrations\n", "from django.conf import settings\n", "VAR_0 = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]\n", "VAR_1 = [migrations.CreateModel(name='StudentGroup', fields=[('id', models.\n AutoField(verbose_name='ID', serialize=False, auto_created=True,\n p...
[ "from django.db import models, migrations\n", "from django.conf import settings\n", "dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]\n", "operations = [migrations.CreateModel(name='StudentGroup', fields=[('id',\n models.AutoField(verbose_name='ID', serialize=False, auto_created=T...
[ 0, 0, 0, 4 ]
[ "ImportFrom'", "ImportFrom'", "Assign'", "Assign'" ]
[ "def FUNC_1(VAR_2, VAR_3):...\n", "VAR_16 = {}\n", "for VAR_42, VAR_45 in VAR_2.items():\n", "if VAR_42 not in VAR_3 and VAR_45:\n", "return VAR_16\n", "VAR_16[VAR_94(VAR_42)] = VAR_45\n" ]
[ "def strip_parameters(request_dict, skip_parameters):...\n", "parameters = {}\n", "for key, value in request_dict.items():\n", "if key not in skip_parameters and value:\n", "return parameters\n", "parameters[str(key)] = value\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Condition", "Return'", "Assign'" ]
[ "def FUNC_0(self):...\n", "VAR_8 = []\n", "for VAR_5 in self.groups:\n", "VAR_8.append(VAR_5.serialize())\n", "return dict(VAR_2=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, VAR_8=groups, implicit=self.implicit)\n" ]
[ "def serialize(self):...\n", "groups = []\n", "for group in self.groups:\n", "groups.append(group.serialize())\n", "return dict(name=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, groups=groups, implicit=self.implicit)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Expr'", "Return'" ]
[ "@VAR_2.patch('core.common.utils.c_onboarding_status')...\n", "self.assertEqual(get_onboarding_setting(VAR_3), VAR_4)\n" ]
[ "@mock.patch('core.common.utils.c_onboarding_status')...\n", "self.assertEqual(get_onboarding_setting(setting_name), value)\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]
[ "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'" ]
[ "def FUNC_18(self, VAR_10, VAR_1=None, VAR_65=None):...\n", "VAR_100 = CLASS_2(self, VAR_10, VAR_1, VAR_65)\n", "self._subworkflows[VAR_10] = VAR_100\n", "self.globals[VAR_10] = VAR_100.target\n" ]
[ "def subworkflow(self, name, snakefile=None, workdir=None):...\n", "sw = Subworkflow(self, name, snakefile, workdir)\n", "self._subworkflows[name] = sw\n", "self.globals[name] = sw.target\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'" ]
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "import mock\n", "import requests\n", "from django.contrib.auth.models import User\n", "from django.test import TransactionTestCase\n", "...
[ "\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n", "from __future__ import unicode_literals\n", "import json\n", "import mock\n", "import requests\n", "from django.contrib.auth.models import User\n", "from django.test import TransactionTestCase\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_13(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_9 = '10.1.2.3'\n", "for feature in ('confirmation', 'paging', 'events', 'formatoutput'):\n", "self.driver._eql_execute('cli-settings', feature, 'off')\n", "self.driver._eql_execute('grpparams', 's...
[ "def test_do_setup(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "fake_group_ip = '10.1.2.3'\n", "for feature in ('confirmation', 'paging', 'events', 'formatoutput'):\n", "self.driver._eql_execute('cli-settings', feature, 'off')\n", "self.driver._eql_execute('...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Expr'", "Expr'", "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 __getitem__(self, VAR_44):...\n", "" ]
[ "def __getitem__(self, key):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def __init__(self, *VAR_4, **VAR_5):...\n", "super(CLASS_0, self).__init__(*VAR_4, **kwargs)\n", "self.configuration.append_config_values(VAR_1)\n", "self._group_ip = None\n", "self.sshpool = None\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(DellEQLSanISCSIDriver, self).__init__(*args, **kwargs)\n", "self.configuration.append_config_values(eqlx_opts)\n", "self._group_ip = None\n", "self.sshpool = None\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assign'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_agent(VAR_1)\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_agent(bindings)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_18(self, VAR_10, VAR_1=None, VAR_65=None):...\n", "VAR_100 = CLASS_2(self, VAR_10, VAR_1, VAR_65)\n", "self._subworkflows[VAR_10] = VAR_100\n", "self.globals[VAR_10] = VAR_100.target\n" ]
[ "def subworkflow(self, name, snakefile=None, workdir=None):...\n", "sw = Subworkflow(self, name, snakefile, workdir)\n", "self._subworkflows[name] = sw\n", "self.globals[name] = sw.target\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'" ]
[ "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "import logging\n", "import os\n", "import random\n", "import re\n", "import tempfile\n", "from cms.grading.languagemanager import filename_to_language\n", "from cmsc...
[ "from __future__ import absolute_import\n", "from __future__ import print_function\n", "from __future__ import unicode_literals\n", "import logging\n", "import os\n", "import random\n", "import re\n", "import tempfile\n", "from cms.grading.languagemanager import filename_to_language\n", "from cmsc...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_14(self, VAR_10=None, VAR_14=None, VAR_16=True):...\n", "\"\"\"docstring\"\"\"\n", "self.add_extra_args(VAR_10)\n", "self.args = super().parse_args(VAR_10=args)\n", "self.opt = vars(self.args)\n", "self.opt['parlai_home'] = self.parlai_home\n", "if 'batchsize' in self.opt and self.opt['batchsi...
[ "def parse_args(self, args=None, namespace=None, print_args=True):...\n", "\"\"\"docstring\"\"\"\n", "self.add_extra_args(args)\n", "self.args = super().parse_args(args=args)\n", "self.opt = vars(self.args)\n", "self.opt['parlai_home'] = self.parlai_home\n", "if 'batchsize' in self.opt and self.opt['bat...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "For", "For", "Condition", "Co...
[ "def FUNC_15(self):...\n", "self.run_test_case(self.scenario.register_load_balancer_instances())\n" ]
[ "def test_c_register_load_balancer_instances(self):...\n", "self.run_test_case(self.scenario.register_load_balancer_instances())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_20(self):...\n", "\"\"\"docstring\"\"\"\n", "return True\n" ]
[ "def check_authorization(self):...\n", "\"\"\"docstring\"\"\"\n", "return True\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_6(self, VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "return '' if VAR_19 is None else VAR_19\n" ]
[ "def run(self, value):...\n", "\"\"\"docstring\"\"\"\n", "return '' if value is None else value\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_5(self):...\n", "if not self['ssh_user'] == 'root':\n", "self['need_sudo'] = True\n" ]
[ "def check_user_privs(self):...\n", "if not self['ssh_user'] == 'root':\n", "self['need_sudo'] = True\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'" ]
[ "def FUNC_2(self, VAR_13, VAR_11, VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "for diff in self.__yield_diffs(VAR_12, VAR_13):\n", "yield Result(self, self.diff_message, affected_code=(diff.range(filename),),\n diffs={filename: diff}, severity=self.diff_severity)\n" ]
[ "def _process_corrected(self, output, filename, file):...\n", "\"\"\"docstring\"\"\"\n", "for diff in self.__yield_diffs(file, output):\n", "yield Result(self, self.diff_message, affected_code=(diff.range(filename),),\n diffs={filename: diff}, severity=self.diff_severity)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Expr'" ]
[ "def FUNC_22(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(id integer, s varchar(20))')\n", "self.cursor.execute('insert into t1 values (?,?)', 1, 'test')\n", "self.cursor.execute('select * from t1')\n", "self.cnxn.close()\n", "self.sql = 'select * from t1'\n", "self.a...
[ "def test_close_cnxn(self):...\n", "\"\"\"docstring\"\"\"\n", "self.cursor.execute('create table t1(id integer, s varchar(20))')\n", "self.cursor.execute('insert into t1 values (?,?)', 1, 'test')\n", "self.cursor.execute('select * from t1')\n", "self.cnxn.close()\n", "self.sql = 'select * from t1'\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "@VAR_0.route('/crawling')...\n", "VAR_10['crawl_start_time'] = time.time()\n", "VAR_11 = VAR_10.get('url', None)\n", "VAR_12 = shlex.split('timeout %d wget -r -A pdf %s' % (VAR_4, VAR_11))\n", "VAR_13 = subprocess.Popen(VAR_12, cwd=WGET_DATA_PATH)\n", "VAR_10['crawl_process_id'] = VAR_13.pid\n", "retur...
[ "@app.route('/crawling')...\n", "session['crawl_start_time'] = time.time()\n", "url = session.get('url', None)\n", "command = shlex.split('timeout %d wget -r -A pdf %s' % (\n MAX_CRAWLING_DURATION, url))\n", "process = subprocess.Popen(command, cwd=WGET_DATA_PATH)\n", "session['crawl_process_id'] = pro...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_1, VAR_2):...\n", "for VAR_13 in VAR_2.strip('/').split('/'):\n", "VAR_1 = VAR_1[VAR_13]\n", "FUNC_1(VAR_1)\n" ]
[ "def scan_git_subtree(tree, path):...\n", "for p in path.strip('/').split('/'):\n", "tree = tree[p]\n", "scan_git_tree(tree)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Assign'", "Expr'" ]
[ "def FUNC_18(self, VAR_25, VAR_27):...\n", "VAR_20 = request_mock(VAR_25=path, method='PUT', VAR_27=body, VAR_28={\n 'Content-Type': ['application/json']})\n", "return self._render(VAR_20)\n" ]
[ "def put(self, path, body):...\n", "request = request_mock(path=path, method='PUT', body=body, headers={\n 'Content-Type': ['application/json']})\n", "return self._render(request)\n" ]
[ 0, 5, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_12(self, VAR_9, VAR_10, VAR_11, VAR_16={}):...\n", "get_and_check_project(VAR_9, VAR_11)\n", "VAR_28 = self.queryset.annotate(**annotate).get(VAR_10=pk, VAR_1=project_pk)\n", "return VAR_28\n" ]
[ "def get_and_check_task(self, request, pk, project_pk, annotate={}):...\n", "get_and_check_project(request, project_pk)\n", "task = self.queryset.annotate(**annotate).get(pk=pk, project=project_pk)\n", "return task\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_4):...\n", "VAR_13 = [(\"facebook: '\" + VAR_9[u'facebook'] + \"' and gmail: '\" + VAR_9[\n u'gmail'] + \"'\") for VAR_9 in VAR_1.emails.find()]\n", "return HttpResponse('\\n\\n'.join(VAR_13))\n" ]
[ "def getAllUsers(request):...\n", "all_emails = [(\"facebook: '\" + email[u'facebook'] + \"' and gmail: '\" +\n email[u'gmail'] + \"'\") for email in db.emails.find()]\n", "return HttpResponse('\\n\\n'.join(all_emails))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_39(VAR_101):...\n", "if VAR_101.input:\n", "VAR_13.set_input(*VAR_101.input[0], **ruleinfo.input[1])\n", "if VAR_101.output:\n", "VAR_13.set_output(*VAR_101.output[0], **ruleinfo.output[1])\n", "if VAR_101.params:\n", "VAR_13.set_params(*VAR_101.params[0], **ruleinfo.params[1])\n", "if VAR_1...
[ "def decorate(ruleinfo):...\n", "if ruleinfo.input:\n", "rule.set_input(*ruleinfo.input[0], **ruleinfo.input[1])\n", "if ruleinfo.output:\n", "rule.set_output(*ruleinfo.output[0], **ruleinfo.output[1])\n", "if ruleinfo.params:\n", "rule.set_params(*ruleinfo.params[0], **ruleinfo.params[1])\n", "if rul...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Condition"...
[ "def FUNC_4(self, VAR_4):...\n", "VAR_6 = 'SELECT COUNT(rno) FROM rides WHERE rno = {rno}'.format(VAR_4=rno)\n", "self.cursor.execute(VAR_6)\n", "VAR_9 = self.cursor.fetchone()\n", "if int(VAR_9[0]) > 0:\n", "return True\n", "return False\n" ]
[ "def verify_rno(self, rno):...\n", "query = 'SELECT COUNT(rno) FROM rides WHERE rno = {rno}'.format(rno=rno)\n", "self.cursor.execute(query)\n", "result = self.cursor.fetchone()\n", "if int(result[0]) > 0:\n", "return True\n", "return False\n" ]
[ 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_9(self):...\n", "\"\"\"docstring\"\"\"\n", "assert self._plasma_store_socket_name is None\n", "self._plasma_store_socket_name = (self._ray_params.plasma_store_socket_name or\n get_object_store_socket_name())\n", "self.prepare_socket_file(self._plasma_store_socket_name)\n", "VAR_14, VAR_15 = n...
[ "def start_plasma_store(self):...\n", "\"\"\"docstring\"\"\"\n", "assert self._plasma_store_socket_name is None\n", "self._plasma_store_socket_name = (self._ray_params.plasma_store_socket_name or\n get_object_store_socket_name())\n", "self.prepare_socket_file(self._plasma_store_socket_name)\n", "stdout...
[ 0, 0, 0, 0, 0, 0, 6, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Assign'", "Expr'", "Assign'", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_5(VAR_8, VAR_9):...\n", "VAR_11, VAR_10 = FUNC_1()\n", "VAR_12 = FUNC_0()\n", "VAR_11.execute(\"INSERT INTO usage (date,user,command) VALUES ('\" + VAR_12 +\n \"','\" + str(VAR_8) + \"','\" + VAR_9 + \"')\")\n", "VAR_10.commit()\n", "VAR_10.close()\n" ]
[ "def insertUsage(user, command):...\n", "c, conn = getConnection()\n", "date = now()\n", "c.execute(\"INSERT INTO usage (date,user,command) VALUES ('\" + date + \"','\" +\n str(user) + \"','\" + command + \"')\")\n", "conn.commit()\n", "conn.close()\n" ]
[ 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "@staticmethod...\n", "VAR_8 = dbaseConn()\n", "VAR_11 = 'SELECT `uid`, `email` FROM `User` WHERE `uid`=%s'\n", "cursor.execute(VAR_11, (VAR_0,))\n", "VAR_10 = cursor.fetchone()\n", "if VAR_10 is None:\n", "VAR_8.db_conn_close()\n", "VAR_9 = ('UPDATE `User` SET `email` = ' + \"'\" + VAR_6 + \"'\" +\n ...
[ "@staticmethod...\n", "dbcon = dbaseConn()\n", "validate_sql = 'SELECT `uid`, `email` FROM `User` WHERE `uid`=%s'\n", "cursor.execute(validate_sql, (uid,))\n", "result = cursor.fetchone()\n", "if result is None:\n", "dbcon.db_conn_close()\n", "sql = ('UPDATE `User` SET `email` = ' + \"'\" + new_email ...
[ 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Expr'", "Expr'", "Expr'", "Expr'", "Return'", "Return'" ]
[ "def FUNC_4(VAR_18, VAR_17, VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "return keyworder.get_composite_keywords(VAR_18, VAR_17, VAR_19) or {}\n" ]
[ "def extract_composite_keywords(ckw_db, fulltext, skw_spans):...\n", "\"\"\"docstring\"\"\"\n", "return keyworder.get_composite_keywords(ckw_db, fulltext, skw_spans) or {}\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def __iter__(self) ->'Iterator[IRow]':...\n", "...\n" ]
[ "def __iter__(self) ->'Iterator[IRow]':...\n", "...\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_18(self):...\n", "if self.child_branch and self.child_leaf:\n", "if self.child_branch == self.parent:\n", "if self.parent and self.child_branch in self.parent.ascendants_of_branch:\n", "if self.child_leaf and self.link_type == LinkTypes.REFERENCE.name:\n" ]
[ "def clean(self):...\n", "if self.child_branch and self.child_leaf:\n", "if self.child_branch == self.parent:\n", "if self.parent and self.child_branch in self.parent.ascendants_of_branch:\n", "if self.child_leaf and self.link_type == LinkTypes.REFERENCE.name:\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Condition", "Condition" ]
[ "def FUNC_6(self, VAR_11):...\n", "VAR_33 = CLASS_43.run(self, VAR_11)\n", "if VAR_33 is None:\n", "return ''\n", "return VAR_33\n" ]
[ "def run(self, url):...\n", "val = VSanitizedUrl.run(self, url)\n", "if val is None:\n", "return ''\n", "return val\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "\"\"\"string\"\"\"\n", "import os\n", "import re\n", "import tempfile\n", "import urllib2\n", "from invenio.legacy.bibclassify import config as bconfig\n", "if bconfig.STANDALONE:\n", "from urllib2 import urlopen\n", "from invenio.utils.url import make_invenio_opener\n", "VAR_0 = bconfig.get_logg...
[ "\"\"\"\nBibClassify text extractor.\n\nThis module provides method to extract the fulltext from local or remote\ndocuments. Currently 2 formats of documents are supported: PDF and text\ndocuments.\n\n2 methods provide the functionality of the module: text_lines_from_local_file\nand text_lines_from_url.\n\nThis mod...
[ 7, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "Condition", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Return'", ...
[ "@patch('invenio.ext.session.interface.SessionInterface.save_session')...\n", "from invenio.modules.oauthclient.models import RemoteToken\n", "from invenio.modules.oauthclient.handlers import token_getter\n", "from invenio.modules.oauthclient.client import oauth\n", "VAR_9 = MagicMock()\n", "VAR_9.get_id ...
[ "@patch('invenio.ext.session.interface.SessionInterface.save_session')...\n", "from invenio.modules.oauthclient.models import RemoteToken\n", "from invenio.modules.oauthclient.handlers import token_getter\n", "from invenio.modules.oauthclient.client import oauth\n", "user = MagicMock()\n", "user.get_id = ...
[ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assert'", "Assert'", "Expr'", "Expr'", "Assert'", "Assign'", "Assert'", "Assert'", "Assert'", "Expr'", "Expr'", "Assign'", "Assert'", "Assert'", "Assign'", "Assert'", ...
[ "@classmethod...\n", "return super(CLASS_0, VAR_3).subsystem_dependencies() + (NativeToolchain.\n scoped(VAR_3), PythonSetup)\n" ]
[ "@classmethod...\n", "return super(PythonNativeCode, cls).subsystem_dependencies() + (NativeToolchain\n .scoped(cls), PythonSetup)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_30(self, VAR_21, VAR_23=True):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_21 == '/':\n", "VAR_57 = {VAR_2: VAR_12, VAR_3: 0, VAR_4: 0, VAR_5: 4096, VAR_6: 16877,\n VAR_7: time.time()}\n", "VAR_57 = self.getfile(VAR_21, VAR_23=follow_symlinks)\n", "if VAR_57 == False:\n", "return CLASS_3(VAR_...
[ "def stat(self, path, follow_symlinks=True):...\n", "\"\"\"docstring\"\"\"\n", "if path == '/':\n", "p = {A_TYPE: T_DIR, A_UID: 0, A_GID: 0, A_SIZE: 4096, A_MODE: 16877,\n A_CTIME: time.time()}\n", "p = self.getfile(path, follow_symlinks=follow_symlinks)\n", "if p == False:\n", "return _statobj(p[A_M...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_16(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_23 = ''\n", "VAR_24 = 16\n", "VAR_25 = platform.architecture()[0]\n", "if VAR_25 == '64bit':\n", "VAR_29 = 40\n", "VAR_29 = 32\n", "VAR_9 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)\n", "VAR_26 = array.array('B',...
[ "def get_first_if(self):...\n", "\"\"\"docstring\"\"\"\n", "iface = ''\n", "expected = 16\n", "python_arc = platform.architecture()[0]\n", "if python_arc == '64bit':\n", "struct_size = 40\n", "struct_size = 32\n", "sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)\n", "bu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "For", "Assign'", "Return'", "Condition" ]
[ "def FUNC_8(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_14, VAR_15 = new_webui_log_file()\n", "self._webui_url, VAR_16 = ray.services.start_ui(self._redis_address, VAR_14\n =stdout_file, VAR_15=stderr_file)\n", "assert VAR_13.PROCESS_TYPE_WEB_UI not in self.all_processes\n", "if VAR_16 is not None:\n...
[ "def start_ui(self):...\n", "\"\"\"docstring\"\"\"\n", "stdout_file, stderr_file = new_webui_log_file()\n", "self._webui_url, process_info = ray.services.start_ui(self._redis_address,\n stdout_file=stdout_file, stderr_file=stderr_file)\n", "assert ray_constants.PROCESS_TYPE_WEB_UI not in self.all_process...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assert'", "Condition", "Assign'" ]