lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_17(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_2():...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = {}\n", "for arg in request.args:\n", "VAR_8 = re.findall('psize_(.*)', arg)\n", "return VAR_6\n", "if VAR_8:\n", "VAR_6[VAR_8[0]] = int(request.args.get(arg))\n" ]
[ "def get_page_size_args():...\n", "\"\"\"docstring\"\"\"\n", "page_sizes = {}\n", "for arg in request.args:\n", "re_match = re.findall('psize_(.*)', arg)\n", "return page_sizes\n", "if re_match:\n", "page_sizes[re_match[0]] = int(request.args.get(arg))\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'" ]
[ "def FUNC_6(self):...\n", "if self.status_code not in [200, 302]:\n", "return False\n", "if self.status_code == 200 and self.res_data is None:\n", "return False\n", "if self.status_code == 200 and len(self.res_data) < CLASS_1.MINIMUM_LENGTH:\n", "return False\n", "return True\n" ]
[ "def test_success(self):...\n", "if self.status_code not in [200, 302]:\n", "return False\n", "if self.status_code == 200 and self.res_data is None:\n", "return False\n", "if self.status_code == 200 and len(self.res_data\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_33(self):...\n", "self.compilation_ko(\n \"\"\"\nif anyof (header :is \"Sender\" {\n fileinto \"trash\";\n}\n\"\"\")\n" ]
[ "def test_nonclosed_tests_list2(self):...\n", "self.compilation_ko(\n \"\"\"\nif anyof (header :is \"Sender\" {\n fileinto \"trash\";\n}\n\"\"\")\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@staticmethod...\n", "VAR_27 = []\n", "VAR_28 = 'camera_name', 'lens_name', 'country_en'\n", "VAR_29 = VAR_8.camera, VAR_8.lens, VAR_8.country['en-US']\n", "for feature_name, VAR_5 in zip(VAR_28, VAR_29):\n", "if not VAR_5:\n", "return VAR_27\n", "VAR_27.append(0)\n", "VAR_10 = FUNC_8(VAR_5, featur...
[ "@staticmethod...\n", "same_feature = []\n", "feature_types = 'camera_name', 'lens_name', 'country_en'\n", "features = image_data.camera, image_data.lens, image_data.country['en-US']\n", "for feature_name, feature in zip(feature_types, features):\n", "if not feature:\n", "return same_feature\n", "same...
[ 0, 0, 0, 4, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "For", "Condition", "Return'", "Expr'", "Assign'", "Expr'" ]
[ "@login_required()...\n", "VAR_5 = {}\n", "VAR_6, VAR_7 = FUNC_5(**kwargs)\n", "VAR_5['concept'] = VAR_6\n", "VAR_4 = VAR_6.transaction\n", "if VAR_4.closed:\n", "return redirect('message', message=gettext('Transaction Closed'))\n", "VAR_5['transaction'] = VAR_4\n", "if VAR_0.method == 'POST':\n", ...
[ "@login_required()...\n", "extra_context = {}\n", "concept, concept_form = get_concept_and_form_from_kwargs(**kwargs)\n", "extra_context['concept'] = concept\n", "transaction = concept.transaction\n", "if transaction.closed:\n", "return redirect('message', message=gettext('Transaction Closed'))\n", "e...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Return'", "Return'" ]
[ "def FUNC_25(self):...\n", "if not self._IsServerAlive():\n", "return\n", "VAR_23 = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n", "vimsupport.PostVimMessage(str(e))\n", "if 'message' in VAR_23:\n", "vimsupport.EchoText(VAR_23['message'])\n" ]
[ "def ShowDetailedDiagnostic(self):...\n", "if not self._IsServerAlive():\n", "return\n", "debug_info = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n", "vimsupport.PostVimMessage(str(e))\n", "if 'message' in debug_info:\n", "vimsupport.EchoText(debug_info['message'])\n" ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Expr'", "Condition", "Expr'" ]
[ "@app.route('/dds')...\n", "return redirect('https://soundcloud.com/doobiedecibelsystem')\n" ]
[ "@app.route('/dds')...\n", "return redirect('https://soundcloud.com/doobiedecibelsystem')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_14(self):...\n", "\"\"\"docstring\"\"\"\n", "for unit in (self.metadata('custom_units') or []):\n", "ureg.define(unit)\n" ]
[ "def register_custom_units(self):...\n", "\"\"\"docstring\"\"\"\n", "for unit in (self.metadata('custom_units') or []):\n", "ureg.define(unit)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Expr'" ]
[ "def FUNC_22(VAR_30, VAR_3):...\n", "if not isinstance(VAR_30, _IOFile):\n", "return IOFile(VAR_30, VAR_16=self)\n", "return VAR_30.apply_wildcards(VAR_3, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n" ]
[ "def concretize_iofile(f, wildcards):...\n", "if not isinstance(f, _IOFile):\n", "return IOFile(f, rule=self)\n", "return f.apply_wildcards(wildcards, fill_missing=f in self.dynamic_input,\n fail_dynamic=self.dynamic_output)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "def FUNC_1(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "verbout(GR, 'Receiving headers...\\n')\n", "verbout(color.GREY, ' ' + color.UNDERLINE + 'HEADERS' + color.END + color.\n GREY + ':' + '\\n')\n", "for key, val in VAR_2.items():\n", "verbout(' ', color.CYAN + key + ': ' + color.ORANGE + val)\n", ...
[ "def pheaders(tup):...\n", "\"\"\"docstring\"\"\"\n", "verbout(GR, 'Receiving headers...\\n')\n", "verbout(color.GREY, ' ' + color.UNDERLINE + 'HEADERS' + color.END + color.\n GREY + ':' + '\\n')\n", "for key, val in tup.items():\n", "verbout(' ', color.CYAN + key + ': ' + color.ORANGE + val)\n", "...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "For", "Expr'", "Expr'" ]
[ "def FUNC_11(self, VAR_38):...\n", "\"\"\"docstring\"\"\"\n", "VAR_71 = ''\n", "if VAR_38:\n", "VAR_55 = VAR_38.keys()[0]\n", "return VAR_71\n", "VAR_90 = getattr(self, self.WHERE_CONDITION_MAPPING.get(VAR_55))\n", "VAR_71 = VAR_90(VAR_38[VAR_55])\n" ]
[ "def _generate_sql_condition(self, data):...\n", "\"\"\"docstring\"\"\"\n", "result = ''\n", "if data:\n", "condition = data.keys()[0]\n", "return result\n", "function = getattr(self, self.WHERE_CONDITION_MAPPING.get(condition))\n", "result = function(data[condition])\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'" ]
[ "def FUNC_10(self):...\n", "self.client.login(username=self.tester.username, password='password')\n", "VAR_4 = {'content_type': 'testplans.testplan', 'object_pk': self.plan.pk,\n 'field': 'is_active', 'value': 'False', 'value_type': 'bool'}\n", "VAR_1 = self.client.post(self.update_url, VAR_4)\n", "self....
[ "def test_update_plan_is_active(self):...\n", "self.client.login(username=self.tester.username, password='password')\n", "post_data = {'content_type': 'testplans.testplan', 'object_pk': self.plan.\n pk, 'field': 'is_active', 'value': 'False', 'value_type': 'bool'}\n", "response = self.client.post(self.upda...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_0(self):...\n", "super(CLASS_2, self).setUp()\n", "self.view = UserUpdateView()\n", "VAR_2 = self.factory.get('/fake-url')\n", "VAR_2.user = self.user\n", "self.view.request = VAR_2\n" ]
[ "def setUp(self):...\n", "super(TestUserUpdateView, self).setUp()\n", "self.view = UserUpdateView()\n", "request = self.factory.get('/fake-url')\n", "request.user = self.user\n", "self.view.request = request\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_1():...\n", "" ]
[ "def connect():...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_4(self, VAR_1, VAR_2, VAR_5, VAR_10=None, VAR_11=False, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_10:\n", "VAR_10 = []\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_29 = {}\n", "for VAR_48 in VAR_5:\n", "VAR_29[VAR_48] = {}.fromkeys(VAR_10, 0.0)\n", "for VAR_55 in VAR_...
[ "def _product_available(self, cr, uid, ids, field_names=None, arg=False,...\n", "\"\"\"docstring\"\"\"\n", "if not field_names:\n", "field_names = []\n", "if context is None:\n", "context = {}\n", "res = {}\n", "for id in ids:\n", "res[id] = {}.fromkeys(field_names, 0.0)\n", "for f in field_names:...
[ 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'", "Condition", "Assign'", "Assign'", "For", "Assign'", "For", "Assign'", "Return'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "For", "Assign'" ]
[ "def FUNC_0(self):...\n", "if not LoginRequest.test_success(self):\n", "return False\n", "if self.redirected_to != self.base_url:\n", "return False\n", "return True\n" ]
[ "def test_success(self):...\n", "if not LoginRequest.test_success(self):\n", "return False\n", "if self.redirected_to != self.base_url:\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def __init__(self, VAR_15, VAR_16, VAR_17):...\n", "\"\"\"docstring\"\"\"\n", "self._name = 'Netatmo {} {}'.format(VAR_16, VAR_5[VAR_17][0])\n", "self.netatmo_data = VAR_15\n", "self.module_name = VAR_16\n", "self.type = VAR_17\n", "self._state = None\n", "self._device_class = VAR_5[self.type][3]\n",...
[ "def __init__(self, netatmo_data, module_name, sensor_type):...\n", "\"\"\"docstring\"\"\"\n", "self._name = 'Netatmo {} {}'.format(module_name, SENSOR_TYPES[sensor_type][0])\n", "self.netatmo_data = netatmo_data\n", "self.module_name = module_name\n", "self.type = sensor_type\n", "self._state = None\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def __str__(self):...\n", "return str(self.raw_chem_name) if self.raw_chem_name else ''\n" ]
[ "def __str__(self):...\n", "return str(self.raw_chem_name) if self.raw_chem_name else ''\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@classmethod...\n", "VAR_31 = lambda _request: None\n", "return [VAR_31, VAR_31]\n" ]
[ "@classmethod...\n", "non_applicable = lambda _request: None\n", "return [non_applicable, non_applicable]\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_0):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def rw_transaction(request):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def FUNC_3(self, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_6:\n", "return []\n", "VAR_14 = 'string'\n", "self.cursor.execute(VAR_14, [tuple(VAR_6)])\n", "return self.cursor.fetchall()\n" ]
[ "def get_cve_cwe_map(self, ids):...\n", "\"\"\"docstring\"\"\"\n", "if not ids:\n", "return []\n", "query = (\n 'SELECT cve_id, cwe.name, cwe.link FROM cve_cwe map JOIN cwe ON map.cwe_id = cwe.id WHERE map.cve_id IN %s'\n )\n", "self.cursor.execute(query, [tuple(ids)])\n", "return self.cursor.fetc...
[ 0, 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Expr'", "Return'" ]
[ "import praw\n", "import re\n", "from datetime import datetime\n", "import operator\n", "import sqlite3\n", "def FUNC_0(VAR_0):...\n", "VAR_4 = datetime.fromtimestamp(VAR_0.created)\n", "return VAR_4.strftime('%Y-%m-%d %H:%M:%S')\n" ]
[ "import praw\n", "import re\n", "from datetime import datetime\n", "import operator\n", "import sqlite3\n", "def getDate(submission):...\n", "time = datetime.fromtimestamp(submission.created)\n", "return time.strftime('%Y-%m-%d %H:%M:%S')\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "Import'", "Import'", "FunctionDef'", "Assign'", "Return'" ]
[ "def __init__(self):...\n", "VAR_0 = []\n", "VAR_6 = os.path.join(settings.config_dir, 'commands.json')\n", "if os.path.isfile(VAR_6):\n", "VAR_0.extend(json.load(json_commands_file))\n", "self.commands = [CLASS_0(c, VAR_2=True) for c in VAR_0]\n" ]
[ "def __init__(self):...\n", "commands = []\n", "ro_commands_file = os.path.join(settings.config_dir, 'commands.json')\n", "if os.path.isfile(ro_commands_file):\n", "commands.extend(json.load(json_commands_file))\n", "self.commands = [Command(c, readonly=True) for c in commands]\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_31(VAR_1, VAR_16):...\n", "VAR_30 = VAR_1.xsrf_token_data == {'some': 'data'}\n", "VAR_12.append((VAR_16, VAR_30))\n" ]
[ "def record(request_handler, method):...\n", "is_valid = request_handler.xsrf_token_data == {'some': 'data'}\n", "calls.append((method, is_valid))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_2(VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(VAR_9, str):\n", "return VAR_9\n", "if isinstance(VAR_9, unicode):\n", "return VAR_9.encode('utf-8')\n", "return str(VAR_9)\n" ]
[ "def _ConvertToAscii(value):...\n", "\"\"\"docstring\"\"\"\n", "if isinstance(value, str):\n", "return value\n", "if isinstance(value, unicode):\n", "return value.encode('utf-8')\n", "return str(value)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_7(self):...\n", "VAR_18 = 'URL: %s\\n' % unicode(self.url)\n", "if self.response is not None:\n", "VAR_18 += \"\"\"\nREQUEST HEADERS\n\"\"\"\n", "VAR_18 += \"\"\"\nNO REQUEST INFORMATION AVAILABLE\n\"\"\"\n", "for key, value in self.response.request.headers.iteritems():\n", "if self.res_data i...
[ "def specific_info(self):...\n", "res = 'URL: %s\\n' % unicode(self.url)\n", "if self.response is not None:\n", "res += \"\"\"\nREQUEST HEADERS\n\"\"\"\n", "res += \"\"\"\nNO REQUEST INFORMATION AVAILABLE\n\"\"\"\n", "for key, value in self.response.request.headers.iteritems():\n", "if self.res_data is ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "AugAssign'", "AugAssign'", "For", "Condition", "AugAssign'", "AugAssign'", "Assign'", "AugAssign'", "AugAssign'", "Return'", "AugAssign'" ]
[ "def FUNC_2(self):...\n", "self._check_key(VAR_0)\n" ]
[ "def test_rsa_key(self):...\n", "self._check_key(RSA_PUBKEY)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = dict(VAR_4 or {})\n", "VAR_4['Content-Length'] = len(VAR_2)\n", "def __init__(self):...\n", "self.content = VAR_2\n", "def FUNC_6(self, VAR_7):...\n", "VAR_8 = self.content\n", "while VAR_8:\n", "yield VAR_8[:VAR_7]\...
[ "def make_fake_response(content, url, headers=None):...\n", "\"\"\"docstring\"\"\"\n", "headers = dict(headers or {})\n", "headers['Content-Length'] = len(content)\n", "def __init__(self):...\n", "self.content = content\n", "def iter_content(self, chunk_size):...\n", "c = self.content\n", "while c:\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "FunctionDef'", "Assign'", "FunctionDef'", "Assign'", "Condition", "Expr'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_8(VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "VAR_25 = []\n", "VAR_26 = []\n", "VAR_27 = CommerceConfiguration.current()\n", "VAR_28 = {'username': VAR_10.username}\n", "VAR_29 = VAR_27.is_cache_enabled\n", "VAR_30 = VAR_27.CACHE_KEY + '.' + str(VAR_10.id) if VAR_29 else None\n", "VAR_31 =...
[ "def get_user_orders(user):...\n", "\"\"\"docstring\"\"\"\n", "no_data = []\n", "user_orders = []\n", "commerce_configuration = CommerceConfiguration.current()\n", "user_query = {'username': user.username}\n", "use_cache = commerce_configuration.is_cache_enabled\n", "cache_key = commerce_configuration...
[ 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'", "For", "Condition", "Return'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_9(self, VAR_9, VAR_10):...\n", "if self._IsServerAlive():\n", "return FUNC_9(VAR_9, VAR_10)\n" ]
[ "def SendCommandRequest(self, arguments, completer):...\n", "if self._IsServerAlive():\n", "return SendCommandRequest(arguments, completer)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "def FUNC_8(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = self.charset\n", "if self._path is not None:\n", "return url_escape(self._path, b\"^A-Za-z0-9\\\\-._~!$&\\\\'()*+,;=%:@/\")\n", "if self._parts:\n", "VAR_12 = self._parts\n", "VAR_7 = b''\n", "if VAR_2:\n", "if self._leading_slash:\n", ...
[ "def to_bytes(self):...\n", "\"\"\"docstring\"\"\"\n", "charset = self.charset\n", "if self._path is not None:\n", "return url_escape(self._path, b\"^A-Za-z0-9\\\\-._~!$&\\\\'()*+,;=%:@/\")\n", "if self._parts:\n", "parts = self._parts\n", "path = b''\n", "if charset:\n", "if self._leading_slash:\...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_24(VAR_19, VAR_20, VAR_21=None):...\n", "VAR_28 = None\n", "if VAR_21:\n", "VAR_28 = jsonutils.dumps({'httpStatus': 'dummy', 'error_code': VAR_21,\n 'module_name': 'dummy', 'error_message': 'bad'})\n", "VAR_29 = mocks.MockRequestsResponse(VAR_20, VAR_28)\n", "VAR_30 = self.new_mocked_client(c...
[ "def _verb_response_code(http_verb, status_code, error_code=None):...\n", "content = None\n", "if error_code:\n", "content = jsonutils.dumps({'httpStatus': 'dummy', 'error_code': error_code,\n 'module_name': 'dummy', 'error_message': 'bad'})\n", "response = mocks.MockRequestsResponse(status_code, content...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_6(self, VAR_19, VAR_17=None, VAR_18=None):...\n", "for ending in ['/', '/index.html']:\n", "if VAR_19.endswith(ending):\n", "VAR_0.debug('Redirecting %s', self)\n", "VAR_19 = VAR_19[1:]\n", "VAR_27 = re.sub(ending + '$', '.html', VAR_19)\n", "return self.get_full_path(VAR_16=to, VAR_17=languag...
[ "def redirect_sphinx_html(self, path, language=None, version_slug=None):...\n", "for ending in ['/', '/index.html']:\n", "if path.endswith(ending):\n", "log.debug('Redirecting %s', self)\n", "path = path[1:]\n", "to = re.sub(ending + '$', '.html', path)\n", "return self.get_full_path(filename=to, langua...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Expr'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(VAR_0):...\n", "import pdb\n", "pdb.set_trace()\n" ]
[ "def SetUpAppendRedirect(cmd):...\n", "import pdb\n", "pdb.set_trace()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Import'", "Expr'" ]
[ "@auth.route('/oauthorize')...\n", "VAR_1 = twitter.authorized_response()\n", "if not VAR_1:\n", "flash(u'You denied the request to sign in.')\n", "VAR_2 = VAR_1['user_id']\n", "return redirect(url_for('gallery.show_posts'))\n", "VAR_3 = User.query.filter_by(VAR_2=user_id).first()\n", "if VAR_3:\n", ...
[ "@auth.route('/oauthorize')...\n", "resp = twitter.authorized_response()\n", "if not resp:\n", "flash(u'You denied the request to sign in.')\n", "user_id = resp['user_id']\n", "return redirect(url_for('gallery.show_posts'))\n", "user = User.query.filter_by(user_id=user_id).first()\n", "if user:\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_6(self, VAR_7):...\n", "VAR_76 = CLASS_6.run(self, VAR_7)\n", "if VAR_76 and not (VAR_101.user_is_loggedin and VAR_76.can_edit(VAR_101.\n", "abort(403, 'forbidden')\n", "return VAR_76\n" ]
[ "def run(self, param):...\n", "meetup = VMeetup.run(self, param)\n", "if meetup and not (c.user_is_loggedin and meetup.can_edit(c.user, c.\n", "abort(403, 'forbidden')\n", "return meetup\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_4(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = self\n", "@classmethod...\n", "VAR_31 = lambda _request: None\n", "return [VAR_31, VAR_31]\n" ]
[ "def test_anonymous(self):...\n", "\"\"\"docstring\"\"\"\n", "test = self\n", "@classmethod...\n", "non_applicable = lambda _request: None\n", "return [non_applicable, non_applicable]\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_16 = self.common.get_volume_stats(VAR_4)\n", "VAR_16['storage_protocol'] = 'FC'\n", "VAR_17 = self.configuration.safe_get('volume_backend_name')\n", "VAR_16['volume_backend_name'] = VAR_17 or self.__class__.__name__\n"...
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "stats = self.common.get_volume_stats(refresh)\n", "stats['storage_protocol'] = 'FC'\n", "backend_name = self.configuration.safe_get('volume_backend_name')\n", "stats['volume_backend_name'] = backend_name or self.__class__....
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_3(VAR_5: HttpRequest, VAR_6: str='/admin/users'):...\n", "\"\"\"docstring\"\"\"\n", "VAR_10 = VAR_6\n", "if VAR_5.GET.get('redirect'):\n", "VAR_10 = VAR_5.GET['redirect']\n", "if not VAR_5.user.is_authenticated:\n", "return HttpResponseForbidden()\n", "VAR_11 = Profile.objects.get(authuser=r...
[ "def action_save_user(request: HttpRequest, default_forward_url: str=...\n", "\"\"\"docstring\"\"\"\n", "forward_url = default_forward_url\n", "if request.GET.get('redirect'):\n", "forward_url = request.GET['redirect']\n", "if not request.user.is_authenticated:\n", "return HttpResponseForbidden()\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, 3, 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "A...
[ "def FUNC_35(VAR_29, VAR_30, VAR_1, VAR_31):...\n", "VAR_40 = FUNC_0(VAR_1, VAR_29)\n", "VAR_41 = FUNC_0(VAR_1, VAR_30)\n", "if VAR_40 is None:\n", "return VAR_41\n", "if VAR_41 is None:\n", "return VAR_40\n", "return VAR_31(VAR_40, VAR_41)\n" ]
[ "def _get_stricter_version(a, b, name, stricter):...\n", "version_a = _parse_java_version(name, a)\n", "version_b = _parse_java_version(name, b)\n", "if version_a is None:\n", "return version_b\n", "if version_b is None:\n", "return version_a\n", "return stricter(version_a, version_b)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "\"\"\"\nCreated on 1 Feb 2018\n\n@author: Teodor Gherasim Nistor\n\"\"\"\n", "from ply import lex\n", "from beamr.lexers.generic import t_error\n", "from beamr.lexers.document import t_COMMENT\n", "import beamr\n", "VAR_0 = ('COMMENT', 'ESCAPE', 'STRETCH1', 'STRETCH2', 'EMPH', 'CITATION',\n 'FOOTNOTE'...
[ "\"\"\"\nCreated on 1 Feb 2018\n\n@author: Teodor Gherasim Nistor\n\"\"\"\n", "from ply import lex\n", "from beamr.lexers.generic import t_error\n", "from beamr.lexers.document import t_COMMENT\n", "import beamr\n", "tokens = ('COMMENT', 'ESCAPE', 'STRETCH1', 'STRETCH2', 'EMPH', 'CITATION',\n 'FOOTNOTE...
[ 0, 0, 0, 2, 0, 2, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_87):...\n", "return map(self._rules.__getitem__, filter(self.is_rule, VAR_87))\n" ]
[ "def rules(items):...\n", "return map(self._rules.__getitem__, filter(self.is_rule, items))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "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_3(self, VAR_6=None, VAR_7='', VAR_8='', VAR_9=None, VAR_10=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = self.session.query(self.obj)\n", "if len(VAR_7.split('.')) >= 2:\n", "VAR_33 = ''\n", "VAR_23 = self.session.query(func.count('*')).select_from(self.obj)\n", "for join_relation in VAR_7...
[ "def query(self, filters=None, order_column='', order_direction='', page=...\n", "\"\"\"docstring\"\"\"\n", "query = self.session.query(self.obj)\n", "if len(order_column.split('.')) >= 2:\n", "tmp_order_column = ''\n", "query_count = self.session.query(func.count('*')).select_from(self.obj)\n", "for jo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Assign'", "For", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_11(VAR_1, *VAR_8, **VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "if current_user.is_authenticated():\n", "return redirect('/')\n", "VAR_21 = FUNC_5(VAR_1)\n", "if not VAR_21:\n", "return redirect('/')\n", "if not VAR_16.get(VAR_17(VAR_1.name) + '_autoregister', False):\n", "return redirect(u...
[ "def signup_handler(remote, *args, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "if current_user.is_authenticated():\n", "return redirect('/')\n", "oauth_token = token_getter(remote)\n", "if not oauth_token:\n", "return redirect('/')\n", "if not session.get(token_session_key(remote.name) + '_autoregis...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Expr'", "Condition", "Return'", "Assign'", "Assign'", "Condition", "Condition", "Expr'", ...
[ "def FUNC_5(self):...\n", "\"\"\"docstring\"\"\"\n", "model.bootstrap_ip_whitelist('bots', ['192.168.1.100/32'])\n", "@api.public...\n", "self.response.write(api.get_current_identity().to_bytes())\n", "VAR_7 = self.make_test_app('/request', CLASS_7)\n", "def FUNC_26(VAR_8):...\n", "api.reset_local_sta...
[ "def test_ip_whitelist_bot(self):...\n", "\"\"\"docstring\"\"\"\n", "model.bootstrap_ip_whitelist('bots', ['192.168.1.100/32'])\n", "@api.public...\n", "self.response.write(api.get_current_identity().to_bytes())\n", "app = self.make_test_app('/request', Handler)\n", "def call(ip):...\n", "api.reset_lo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Condition", "Expr'", "Assign'", "FunctionDef'", "Expr'", "Return'" ]
[ "@VAR_0.route('/authorized/<remote_app>/')...\n", "\"\"\"docstring\"\"\"\n", "if VAR_1 not in handlers:\n", "return abort(404)\n", "return handlers[VAR_1]()\n" ]
[ "@blueprint.route('/authorized/<remote_app>/')...\n", "\"\"\"docstring\"\"\"\n", "if remote_app not in handlers:\n", "return abort(404)\n", "return handlers[remote_app]()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Return'", "Return'" ]
[ "def FUNC_6():...\n", "VAR_12 = FUNC_0()\n", "VAR_13 = VAR_12.cursor()\n", "VAR_14 = []\n", "VAR_15 = 'string'\n", "VAR_13.execute(VAR_15)\n", "VAR_16 = VAR_13.fetchall()\n", "for VAR_21 in VAR_16:\n", "VAR_21 = list(VAR_21)\n", "VAR_14.sort(key=lambda row: row[0])\n", "VAR_21[1] = float(VAR_21[...
[ "def display_all_data():...\n", "conn = check_heroku_db()\n", "cur = conn.cursor()\n", "out = []\n", "query = \"\"\"\n SELECT txn_date, amount, cat_name, description, person_name, ledger.id\n FROM ledger\n JOIN persons\n ON ledger.person_id=persons.id\n ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "For", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_2(self):...\n", "VAR_6 = BeautifulSoup(self.res_data, 'html.parser')\n", "VAR_7 = {}\n", "VAR_8 = VAR_6.find_all(id='submission_status')[0]\n", "VAR_7['status'] = VAR_8.text.strip()\n", "VAR_9 = VAR_6.find_all(id='compilation')\n", "if VAR_9:\n", "VAR_12 = VAR_9[0]\n", "VAR_7['compile_outp...
[ "def get_submission_info(self):...\n", "soup = BeautifulSoup(self.res_data, 'html.parser')\n", "info = {}\n", "tag = soup.find_all(id='submission_status')[0]\n", "info['status'] = tag.text.strip()\n", "tags = soup.find_all(id='compilation')\n", "if tags:\n", "content = tags[0]\n", "info['compile_out...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "VAR_1 = 'http://my.url.com'\n", "VAR_2 = 'True'\n", "url_helper.urllib2.urlopen(mox.IsA(urllib2.Request), timeout=mox.IgnoreArg()\n ).AndReturn(StringIO.StringIO(VAR_2))\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen(VAR_1, method='POSTFORM'), VAR_2)\n", ...
[ "def testUrlOpenPOSTFORMSuccess(self):...\n", "url = 'http://my.url.com'\n", "response = 'True'\n", "url_helper.urllib2.urlopen(mox.IsA(urllib2.Request), timeout=mox.IgnoreArg()\n ).AndReturn(StringIO.StringIO(response))\n", "self._mox.ReplayAll()\n", "self.assertEqual(url_helper.UrlOpen(url, method='P...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_31(VAR_62):...\n", "\"\"\"docstring\"\"\"\n", "VAR_84 = 0\n", "while VAR_62[VAR_84].isdigit():\n", "VAR_84 += 1\n", "if VAR_84 > 0:\n", "return int(VAR_62[:VAR_84])\n", "return 0\n" ]
[ "def _get_value_kw(kw):...\n", "\"\"\"docstring\"\"\"\n", "i = 0\n", "while kw[i].isdigit():\n", "i += 1\n", "if i > 0:\n", "return int(kw[:i])\n", "return 0\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "AugAssign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_6(self):...\n", "if is_banned_IP(VAR_102.ip):\n", "VAR_101.errors.add(errors.BANNED_IP)\n", "return VAR_102.ip\n" ]
[ "def run(self):...\n", "if is_banned_IP(request.ip):\n", "c.errors.add(errors.BANNED_IP)\n", "return request.ip\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Return'" ]
[ "def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3):...\n", "self.cmd = VAR_0\n", "self.stdout = VAR_1\n", "self.stderr = VAR_2\n", "self.ret_code = VAR_3\n" ]
[ "def __init__(self, cmd, stdout, stderr, ret_code):...\n", "self.cmd = cmd\n", "self.stdout = stdout\n", "self.stderr = stderr\n", "self.ret_code = ret_code\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_14(self, VAR_64):...\n", "self._onerror = VAR_64\n" ]
[ "def onerror(self, func):...\n", "self._onerror = func\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "@login_required()...\n", "VAR_3 = DataGroup.objects.all()\n", "VAR_4 = {}\n", "VAR_4['object_list'] = VAR_3\n", "return render(VAR_0, VAR_1, VAR_4)\n" ]
[ "@login_required()...\n", "datagroup = DataGroup.objects.all()\n", "data = {}\n", "data['object_list'] = datagroup\n", "return render(request, template_name, data)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_19(self, VAR_14):...\n", "" ]
[ "def is_relation_many_to_many(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_14(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'MEDIUM': 3}, 'CONFIDENCE': {'HIGH': 3}}\n", "self.check_example('httplib_https.py', VAR_2)\n" ]
[ "def test_httplib_https(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'MEDIUM': 3}, 'CONFIDENCE': {'HIGH': 3}}\n", "self.check_example('httplib_https.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_16(self):...\n", "self.assertEqual(self.driver._get_space_in_gb('123.0GB'), 123.0)\n", "self.assertEqual(self.driver._get_space_in_gb('123.0TB'), 123.0 * 1024)\n", "self.assertEqual(self.driver._get_space_in_gb('1024.0MB'), 1.0)\n" ]
[ "def test_get_space_in_gb(self):...\n", "self.assertEqual(self.driver._get_space_in_gb('123.0GB'), 123.0)\n", "self.assertEqual(self.driver._get_space_in_gb('123.0TB'), 123.0 * 1024)\n", "self.assertEqual(self.driver._get_space_in_gb('1024.0MB'), 1.0)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'" ]
[ "import json as json_module\n", "import logging\n", "import sys\n", "from citest.service_testing import HttpContractBuilder\n", "from citest.service_testing import NoOpOperation\n", "import citest.gcp_testing as gcp\n", "import citest.json_contract as jc\n", "import citest.service_testing as st\n", ...
[ "import json as json_module\n", "import logging\n", "import sys\n", "from citest.service_testing import HttpContractBuilder\n", "from citest.service_testing import NoOpOperation\n", "import citest.gcp_testing as gcp\n", "import citest.json_contract as jc\n", "import citest.service_testing as st\n", ...
[ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Conditio...
[ "def FUNC_5(self):...\n", "if not self.route:\n", "return frappe.db.get_value('Blog Category', self.blog_category, 'route'\n ) + '/' + self.scrub(self.title)\n" ]
[ "def make_route(self):...\n", "if not self.route:\n", "return frappe.db.get_value('Blog Category', self.blog_category, 'route'\n ) + '/' + self.scrub(self.title)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "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'" ]
[ "@app.route('/updatedb/politicians')...\n", "return insert_politicians_in_db()\n" ]
[ "@app.route('/updatedb/politicians')...\n", "return insert_politicians_in_db()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_21(self):...\n", "@eqlx.with_timeout...\n", "return 'no timeout'\n" ]
[ "def test_with_timeout(self):...\n", "@eqlx.with_timeout...\n", "return 'no timeout'\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return User.filter_users(VAR_4, VAR_13, VAR_14)\n" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "return User.filter_users(username, project_id, page)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_0(self, *VAR_5, **VAR_4):...\n", "if self.run_local:\n", "return utils.execute(*VAR_5, **kwargs)\n", "VAR_7 = VAR_4.pop('check_exit_code', None)\n", "VAR_6 = ' '.join(VAR_5)\n", "return self._run_ssh(VAR_6, VAR_7)\n" ]
[ "def san_execute(self, *cmd, **kwargs):...\n", "if self.run_local:\n", "return utils.execute(*cmd, **kwargs)\n", "check_exit_code = kwargs.pop('check_exit_code', None)\n", "command = ' '.join(cmd)\n", "return self._run_ssh(command, check_exit_code)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Assign'", "Return'" ]
[ "def __exit__(self, VAR_7, VAR_8, VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "for VAR_12, VAR_8 in self.extra_data.items():\n", "if not isinstance(VAR_12, str) or not isinstance(VAR_8, str):\n", "if VAR_7 is not None:\n", "VAR_5 = json.dumps({'type': str(VAR_7), 'value': str(VAR_8), 'traceback':\n str(t...
[ "def __exit__(self, type, value, tb):...\n", "\"\"\"docstring\"\"\"\n", "for key, value in self.extra_data.items():\n", "if not isinstance(key, str) or not isinstance(value, str):\n", "if type is not None:\n", "extra_data = json.dumps({'type': str(type), 'value': str(value),\n 'traceback': str(tracebac...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "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_32(self):...\n", "VAR_33 = VAR_5.search(self.file)\n", "if VAR_33:\n", "return self.file[:VAR_33.start()]\n", "return self.file\n" ]
[ "def constant_prefix(self):...\n", "first_wildcard = _wildcard_regex.search(self.file)\n", "if first_wildcard:\n", "return self.file[:first_wildcard.start()]\n", "return self.file\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "@app.route('/search', methods=['POST', 'GET'])...\n", "VAR_5 = request.args.get('q').lower()\n", "VAR_7 = Politician.all()\n", "VAR_7.filter('name =', VAR_5)\n", "VAR_2 = None\n", "for p in VAR_7:\n", "VAR_2 = p\n", "if VAR_2 != None:\n", "VAR_2.search_count = VAR_2.search_count + 1\n", "return r...
[ "@app.route('/search', methods=['POST', 'GET'])...\n", "query = request.args.get('q').lower()\n", "politicians = Politician.all()\n", "politicians.filter('name =', query)\n", "politician = None\n", "for p in politicians:\n", "politician = p\n", "if politician != None:\n", "politician.search_count = ...
[ 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "For", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Return'" ]
[ "def FUNC_10(self, VAR_15, VAR_16):...\n", "VAR_36 = {'cmd': 'sleep', 'duration': task_scheduler.exponential_backoff(\n VAR_15), 'quarantined': VAR_16}\n", "self.send_response(VAR_36)\n" ]
[ "def _cmd_sleep(self, sleep_streak, quarantined):...\n", "out = {'cmd': 'sleep', 'duration': task_scheduler.exponential_backoff(\n sleep_streak), 'quarantined': quarantined}\n", "self.send_response(out)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "@property...\n", "return self._subworkflows.values()\n" ]
[ "@property...\n", "return self._subworkflows.values()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_17(self):...\n", "self.run_test_case(self.scenario.destroy_server_group('v001'))\n" ]
[ "def test_h_destroy_server_group_v001(self):...\n", "self.run_test_case(self.scenario.destroy_server_group('v001'))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_3(self, VAR_6):...\n", "self.common = self._init_common()\n", "self._check_flags()\n", "self.iscsi_ips = {}\n", "VAR_21 = {}\n", "if len(self.configuration.hp3par_iscsi_ips) > 0:\n", "for VAR_42 in self.configuration.hp3par_iscsi_ips:\n", "if self.configuration.iscsi_ip_address not in VAR_21...
[ "def do_setup(self, context):...\n", "self.common = self._init_common()\n", "self._check_flags()\n", "self.iscsi_ips = {}\n", "temp_iscsi_ip = {}\n", "if len(self.configuration.hp3par_iscsi_ips) > 0:\n", "for ip_addr in self.configuration.hp3par_iscsi_ips:\n", "if self.configuration.iscsi_ip_address 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 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "For", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "For", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Expr'",...
[ "def FUNC_9(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_16 = os.path.join(VAR_2, 'bin', 'tljh-config')\n", "VAR_17 = '/usr/bin/tljh-config'\n", "if os.path.exists(VAR_17):\n", "if os.path.realpath(VAR_17) != VAR_16:\n", "os.symlink(VAR_16, VAR_17)\n", "return\n" ]
[ "def ensure_symlinks(prefix):...\n", "\"\"\"docstring\"\"\"\n", "tljh_config_src = os.path.join(prefix, 'bin', 'tljh-config')\n", "tljh_config_dest = '/usr/bin/tljh-config'\n", "if os.path.exists(tljh_config_dest):\n", "if os.path.realpath(tljh_config_dest) != tljh_config_src:\n", "os.symlink(tljh_confi...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Condition", "Expr'", "Return'" ]
[ "def __init__(self):...\n", "self.content = VAR_2\n" ]
[ "def __init__(self):...\n", "self.content = content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Assign'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._server\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._server\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_4(VAR_6, VAR_7, **VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "assert VAR_0.name != VAR_6.name, 'Refusing to route reply back to the same network, as this would cause a recursive loop'\n", "log.debug('(%s) networks.remote: re-routing reply %r from network %s',\n VAR_0.name, VAR_7, VAR_6.name)\n", ...
[ "def _remote_reply(placeholder_self, text, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "assert irc.name != placeholder_self.name, 'Refusing to route reply back to the same network, as this would cause a recursive loop'\n", "log.debug('(%s) networks.remote: re-routing reply %r from network %s', irc.\n name...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_4(VAR_9):...\n", "VAR_9.cmd('send-keys', '', 'C-c')\n", "VAR_9.kill_window()\n" ]
[ "def kill_window(window):...\n", "window.cmd('send-keys', '', 'C-c')\n", "window.kill_window()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_14 = {'username': 'autotest', 'app': VAR_6}\n", "VAR_4 = '/api/hooks/builds'.format(**l...
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "build = {'username': 'autotest', 'app': app_id}\n", "url = '/api...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "self.client.login(username='autotest2', password='password')\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "self.client.login(usernam...
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "self.client.login(username='autotest2', password='password')\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", ...
[ 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_10(self):...\n", "VAR_18 = self._session\n", "if VAR_18 is None:\n", "return\n", "self._session = None\n", "VAR_18.close()\n" ]
[ "def _detach(self):...\n", "session = self._session\n", "if session is None:\n", "return\n", "self._session = None\n", "session.close()\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "Expr'" ]
[ "from pylons import c, request, g\n", "from pylons.i18n import _\n", "from pylons.controllers.util import abort\n", "from r2.lib import utils, captcha\n", "from r2.lib.filters import unkeep_space, websafe, _force_utf8, _force_ascii\n", "from r2.lib.db.operators import asc, desc\n", "from r2.config impor...
[ "from pylons import c, request, g\n", "from pylons.i18n import _\n", "from pylons.controllers.util import abort\n", "from r2.lib import utils, captcha\n", "from r2.lib.filters import unkeep_space, websafe, _force_utf8, _force_ascii\n", "from r2.lib.db.operators import asc, desc\n", "from r2.config impor...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", ...
[ "def FUNC_10(self):...\n", "VAR_1 = self.objects.dg.pk\n", "VAR_2 = self.client.get(f'/datagroup/{VAR_1}/')\n", "self.assertContains(VAR_2, '<a href=\"/datasource/', msg_prefix=\n 'Should be able to get back to DataSource from here.')\n" ]
[ "def test_detail_datasource_link(self):...\n", "pk = self.objects.dg.pk\n", "response = self.client.get(f'/datagroup/{pk}/')\n", "self.assertContains(response, '<a href=\"/datasource/', msg_prefix=\n 'Should be able to get back to DataSource from here.')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "@VAR_0.route('/load_bounding_box_mailles/<limit>', methods=['GET'])...\n", "VAR_8 = getConnexion()\n", "VAR_9 = 'SELECT ST_TRANSFORM(ST_MakeEnvelope(' + VAR_4 + ', 4326),32620);'\n", "VAR_8.cur.execute(VAR_9)\n", "VAR_12 = VAR_8.cur.fetchone()\n", "VAR_9 = 'string' + VAR_4 + \"\"\", 4326),32620)) ) AS f...
[ "@addObs.route('/load_bounding_box_mailles/<limit>', methods=['GET'])...\n", "db = getConnexion()\n", "sql = 'SELECT ST_TRANSFORM(ST_MakeEnvelope(' + limit + ', 4326),32620);'\n", "db.cur.execute(sql)\n", "bounding = db.cur.fetchone()\n", "sql = \"\"\" SELECT row_to_json(fc)\n FROM ( SELECT \...
[ 0, 0, 4, 0, 4, 4, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_13(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7, VAR_12 = self.make_xsrf_handling_app()\n", "VAR_17 = VAR_7.get('/request').body\n", "VAR_7.post('/request', {'xsrf_token': VAR_17})\n", "self.assertEqual([('POST', True)], VAR_12)\n" ]
[ "def test_xsrf_token_post_param(self):...\n", "\"\"\"docstring\"\"\"\n", "app, calls = self.make_xsrf_handling_app()\n", "token = app.get('/request').body\n", "app.post('/request', {'xsrf_token': token})\n", "self.assertEqual([('POST', True)], calls)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_0(VAR_3=None, VAR_4=None, VAR_5=True):...\n", "VAR_14, VAR_15 = vimsupport.CurrentLineAndColumn()\n", "VAR_16 = vimsupport.GetCurrentBufferFilepath()\n", "VAR_17 = {'filetypes': vimsupport.CurrentFiletypes(), 'line_num': VAR_14,\n 'column_num': VAR_15, 'start_column': VAR_3, 'line_value': vim.cur...
[ "def BuildRequestData(start_column=None, query=None, include_buffer_data=True):...\n", "line, column = vimsupport.CurrentLineAndColumn()\n", "filepath = vimsupport.GetCurrentBufferFilepath()\n", "request_data = {'filetypes': vimsupport.CurrentFiletypes(), 'line_num':\n line, 'column_num': column, 'start_co...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_6(self, *VAR_4, **VAR_5):...\n", "return self._run_ssh(VAR_4, VAR_14=self.configuration.eqlx_cli_max_retries)\n" ]
[ "def _eql_execute(self, *args, **kwargs):...\n", "return self._run_ssh(args, attempts=self.configuration.eqlx_cli_max_retries)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_44(self):...\n", "return [i.name for i in self.obj.__mapper__.columns if isinstance(i.type,\n FileColumn)]\n" ]
[ "def get_file_column_list(self):...\n", "return [i.name for i in self.obj.__mapper__.columns if isinstance(i.type,\n FileColumn)]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(self, VAR_13, VAR_11, VAR_12, VAR_14='tests'):...\n", "\"\"\"docstring\"\"\"\n", "self._logger.csv(VAR_13 + '_waypoints', ['X_target', 'Y_target', 'X_map',\n 'Y_map', 'X_ekf', 'Y_ekf'], [VAR_11, VAR_12, self.map_pos.x, self.\n map_pos.y, self.p.x, self.p.y], VAR_14=folder)\n" ]
[ "def csvLogArrival(self, test_name, x, y, folder='tests'):...\n", "\"\"\"docstring\"\"\"\n", "self._logger.csv(test_name + '_waypoints', ['X_target', 'Y_target', 'X_map',\n 'Y_map', 'X_ekf', 'Y_ekf'], [x, y, self.map_pos.x, self.map_pos.y, self\n .p.x, self.p.y], folder=folder)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._unit_of_measurement\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._unit_of_measurement\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_15(self, VAR_24='/tmp/app_test_client.log', VAR_22=4567, VAR_23=...\n", "def FUNC_41():...\n", "self.listenTCP(VAR_22, VAR_23)\n", "reactor.run()\n", "VAR_67 = multiprocessing.Process(target=_start)\n", "VAR_67.start()\n", "time.sleep(1)\n", "return lambda : VAR_67.terminate()\n" ]
[ "def run_on_a_thread(self, logfile='/tmp/app_test_client.log', port=4567,...\n", "def _start():...\n", "self.listenTCP(port, host)\n", "reactor.run()\n", "process = multiprocessing.Process(target=_start)\n", "process.start()\n", "time.sleep(1)\n", "return lambda : process.terminate()\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_37(self, VAR_29):...\n", "VAR_12.append('authorization_error')\n", "super(CLASS_7, self).authorization_error(VAR_29)\n" ]
[ "def authorization_error(self, err):...\n", "calls.append('authorization_error')\n", "super(Handler, self).authorization_error(err)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_7(self, VAR_21, VAR_22, VAR_23=None):...\n", "import migrate.changeset\n", "VAR_38 = datetime.now().strftime('_%Y%m%d%H%M%S').encode('utf-8')\n", "self.metadata\n", "VAR_39 = 'tmp_'.encode('utf-8')\n", "VAR_40 = sqlalchemy.Table(VAR_21, self.metadata, autoload=True,\n autoload_with=self._engi...
[ "def replace(self, table, dataframe, batch_size=None):...\n", "import migrate.changeset\n", "suffix = datetime.now().strftime('_%Y%m%d%H%M%S').encode('utf-8')\n", "self.metadata\n", "temp = 'tmp_'.encode('utf-8')\n", "source = sqlalchemy.Table(table, self.metadata, autoload=True,\n autoload_with=self._...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Import'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Assign'", "For", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Expr'", "As...
[ "def FUNC_2(self, VAR_2, VAR_4):...\n", "VAR_16 = VAR_4.get_access_mode()\n", "if VAR_16 == VAR_1.ANONYMOUS:\n", "return True\n", "if not VAR_2.user.is_authenticated():\n", "return False\n", "if VAR_16 >= VAR_1.SUPERUSER:\n", "return VAR_2.user.is_superuser\n", "if VAR_16 >= VAR_1.TEACHER:\n", "if...
[ "def has_permission(self, request, view):...\n", "access_mode = view.get_access_mode()\n", "if access_mode == ACCESS.ANONYMOUS:\n", "return True\n", "if not request.user.is_authenticated():\n", "return False\n", "if access_mode >= ACCESS.SUPERUSER:\n", "return request.user.is_superuser\n", "if acces...
[ 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Condition", "Condition", "Condition", "Expr'", "Return'", "Condition", "Condition", "Return'", "Expr'", "Condition", "Return'", "Expr'", "Return'" ]
[ "def FUNC_1(self):...\n", "super(CLASS_0, self).setUp()\n", "self.mock(net, 'url_open', self._url_open)\n", "self.mock(net, 'url_read_json', self._url_read_json)\n", "self.mock(net, 'sleep_before_retry', lambda *VAR_10: None)\n", "self._lock = threading.Lock()\n", "self._requests = []\n" ]
[ "def setUp(self):...\n", "super(TestCase, self).setUp()\n", "self.mock(net, 'url_open', self._url_open)\n", "self.mock(net, 'url_read_json', self._url_read_json)\n", "self.mock(net, 'sleep_before_retry', lambda *_: None)\n", "self._lock = threading.Lock()\n", "self._requests = []\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_11(self):...\n", "VAR_13 = self.cnxn.getinfo(pyodbc.SQL_CONCAT_NULL_BEHAVIOR)\n", "self.assertTrue(isinstance(VAR_13, int))\n" ]
[ "def test_getinfo_smallint(self):...\n", "value = self.cnxn.getinfo(pyodbc.SQL_CONCAT_NULL_BEHAVIOR)\n", "self.assertTrue(isinstance(value, int))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "async def FUNC_7(VAR_12: int, VAR_13: int):...\n", "\"\"\"docstring\"\"\"\n", "VAR_15 = -1\n", "await cursor.execute(\n 'INSERT INTO item (player_uid, item_id) values (%d, %d)' %\n (VAR_12, VAR_13))\n", "FUNC_10(ex)\n", "await conn.commit()\n", "VAR_15 = conn.insert_id()\n", "re...
[ "async def create_item(player_uid: int, item_id: int):...\n", "\"\"\"docstring\"\"\"\n", "uid = -1\n", "await cursor.execute(\n 'INSERT INTO item (player_uid, item_id) values (%d, %d)' %\n (player_uid, item_id))\n", "_error_report(ex)\n", "await conn.commit()\n", "uid = conn.insert...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Return'", "Return'" ]
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'HIGH': 13}, 'CONFIDENCE': {'HIGH': 13}}\n", "self.check_example('ciphers.py', VAR_2)\n" ]
[ "def test_ciphers(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'HIGH': 13}, 'CONFIDENCE': {'HIGH': 13}}\n", "self.check_example('ciphers.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "import asyncio\n", "import click\n", "import collections\n", "import hashlib\n", "import os\n", "import sys\n", "import threading\n", "import traceback\n", "import urllib.parse\n", "from concurrent import futures\n", "from pathlib import Path\n", "from markupsafe import Markup\n", "from jin...
[ "import asyncio\n", "import click\n", "import collections\n", "import hashlib\n", "import os\n", "import sys\n", "import threading\n", "import traceback\n", "import urllib.parse\n", "from concurrent import futures\n", "from pathlib import Path\n", "from markupsafe import Markup\n", "from jin...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'...