lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"\"\"\"string\"\"\"\n",
"import socket\n",
"import MySQLdb\n",
"import sshtunnel\n",
"from photogpsbot import log\n",
"import config\n",
"\"\"\"string\"\"\"\n",
"VAR_0 = None\n",
"VAR_1 = None\n",
"VAR_2 = False\n",
"def FUNC_0(self):...\n",
"\"\"\"docstring\"\"\"\n",
"log.debug(\n 'Estab... | [
"\"\"\"\nModule that provides a way to connect to MySQL and reconnect each time\nconnection is lost. It also can automatically set up SSH tunnel thanks to\nsshtunnel module\n\nOriginal way to do it was described at\nhttps://help.pythonanywhere.com/pages/ManagingDatabaseConnections/\n\"\"\"\n",
"import socket\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
"Expr'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Expr'",
... |
[
"@Json...\n",
"if VAR_2._chk_error(errors.NO_TITLE):\n",
"VAR_2._chk_error(errors.TITLE_TOO_LONG)\n",
"VAR_2._chk_errors((errors.NO_LOCATION, errors.NO_DESCRIPTION, errors.\n INVALID_DATE, errors.NO_DATE))\n",
"VAR_2._focus('title')\n",
"if VAR_2.error:\n",
"return\n",
"VAR_0.title = VAR_4\n",
"V... | [
"@Json...\n",
"if res._chk_error(errors.NO_TITLE):\n",
"res._chk_error(errors.TITLE_TOO_LONG)\n",
"res._chk_errors((errors.NO_LOCATION, errors.NO_DESCRIPTION, errors.\n INVALID_DATE, errors.NO_DATE))\n",
"res._focus('title')\n",
"if res.error:\n",
"return\n",
"meetup.title = title\n",
"meetup.des... | [
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",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"VAR_16 = []\n",
"VAR_17 = strftime('%Y-%m-%d %H:%M:%S', localtime())\n",
"VAR_16.append('%s on %s' % (CLASS_0.MON_CONF_GEN_COMMENT, VAR_17))\n",
"if self.etag:\n",
"VAR_16.append('%s%s' % (CLASS_0.ETAG_COMMENT, self.etag))\n",
"if self.mtime:\n",
"VAR_16.append('%s%d' % (CLA... | [
"def serialize(self):...\n",
"lines = []\n",
"time_string = strftime('%Y-%m-%d %H:%M:%S', localtime())\n",
"lines.append('%s on %s' % (Header.MON_CONF_GEN_COMMENT, time_string))\n",
"if self.etag:\n",
"lines.append('%s%s' % (Header.ETAG_COMMENT, self.etag))\n",
"if self.mtime:\n",
"lines.append('%s%d'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Return'"
] |
[
"@app.route('/people/<user_id>/edit', methods=['GET'])...\n",
"VAR_2 = NameForm()\n",
"VAR_4 = ''\n",
"VAR_5 = ''\n",
"VAR_6 = User.query.filter_by(id=user_id).first()\n",
"if VAR_6.username != '':\n",
"VAR_5 = VAR_6.username\n",
"VAR_4 = VAR_6.name\n",
"VAR_7 = list(map(lambda VAR_4: {'name': VAR_4... | [
"@app.route('/people/<user_id>/edit', methods=['GET'])...\n",
"form = NameForm()\n",
"name = ''\n",
"username = ''\n",
"prsn = User.query.filter_by(id=user_id).first()\n",
"if prsn.username != '':\n",
"username = prsn.username\n",
"name = prsn.name\n",
"names = list(map(lambda name: {'name': name.na... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@login_required...\n",
"VAR_10 = VAR_2.GET['term']\n",
"VAR_30 = FUNC_26(Keyword, VAR_10)\n",
"VAR_30.extend(FUNC_29(VAR_10))\n",
"return JsonResponse({'err': 'nil', 'results': VAR_30})\n"
] | [
"@login_required...\n",
"term = request.GET['term']\n",
"results = _get_previously_used(Keyword, term)\n",
"results.extend(_get_fast_results(term))\n",
"return JsonResponse({'err': 'nil', 'results': results})\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_1(VAR_1):...\n",
"for VAR_15, deps in VAR_1.items():\n",
"print(VAR_15, '->', deps)\n"
] | [
"def print_deps(graph):...\n",
"for c, deps in graph.items():\n",
"print(c, '->', deps)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"For",
"Expr'"
] |
[
"def FUNC_0(self, VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8):...\n",
"VAR_22 = 'string' + \"({}, {}, {}, '{}', '{}', '{}', {}, {})\".format(json.\n dumps(VAR_3), json.dumps(VAR_4), json.dumps(VAR_5), VAR_6, datetime.now\n (), VAR_7, json.dumps(VAR_8), 0)\n",
"self.cur.execute(VAR_22)\n",
"self.conn.commi... | [
"def insert_query_log(self, lhash, text, search, qhash, ip, browser):...\n",
"sql = (\n 'INSERT INTO log_query (log_hash, query_text, query_search, query_hash, query_time, client_ip, client_browser, clicked) VALUES'\n + \"({}, {}, {}, '{}', '{}', '{}', {}, {})\".format(json.dumps(lhash),\n json.dumps(te... | [
0,
0,
4,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_15(VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"if FUNC_12(VAR_16, 'temp'):\n",
"return VAR_19(VAR_16, 'protected')\n"
] | [
"def protected(value):...\n",
"\"\"\"docstring\"\"\"\n",
"if is_flagged(value, 'temp'):\n",
"return flag(value, 'protected')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'"
] |
[
"def FUNC_8(self, VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"return None\n"
] | [
"def set_hostname(self, hostname):...\n",
"\"\"\"docstring\"\"\"\n",
"return None\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._raylet_socket_name\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._raylet_socket_name\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_8(self, VAR_9, VAR_7=False, VAR_10=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_29 = self.output if VAR_7 else self.input\n",
"if isinstance(VAR_9, str):\n",
"if isinstance(VAR_9, _IOFile):\n",
"if callable(VAR_9):\n",
"self.dependencies[VAR_9] = VAR_9.rule\n",
"VAR_44 = IOFile(VAR_9, VAR_1... | [
"def _set_inoutput_item(self, item, output=False, name=None):...\n",
"\"\"\"docstring\"\"\"\n",
"inoutput = self.output if output else self.input\n",
"if isinstance(item, str):\n",
"if isinstance(item, _IOFile):\n",
"if callable(item):\n",
"self.dependencies[item] = item.rule\n",
"_item = IOFile(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,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Expr'",
"For",
"Condition",
"Condition",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Expr'",
"E... |
[
"def FUNC_3(self, VAR_15, VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_20 = gcp.GceContractBuilder(self.gce_observer)\n",
"VAR_22 = VAR_20.new_clause_builder('Instances Deleted', retryable_for_secs=\n 15, strict=True).list_resources('instances')\n",
"for name in VAR_15:\n",
"VAR_40 = jc.PathContains... | [
"def terminate_instances(self, names, zone):...\n",
"\"\"\"docstring\"\"\"\n",
"builder = gcp.GceContractBuilder(self.gce_observer)\n",
"clause = builder.new_clause_builder('Instances Deleted', retryable_for_secs\n =15, strict=True).list_resources('instances')\n",
"for name in names:\n",
"name_matches_... | [
0,
0,
0,
0,
0,
1,
0,
1,
0,
1
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Assign'",
"Return'",
"Expr'"
] |
[
"def FUNC_0(VAR_0):...\n",
"return binascii.b2a_hex(base64.b64encode(VAR_0.encode('utf-8'))).decode('utf-8'\n )\n"
] | [
"def encode_str_to_hexed_b64(data):...\n",
"return binascii.b2a_hex(base64.b64encode(data.encode('utf-8'))).decode('utf-8')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"VAR_14 = self.client.get('/get_data/')\n",
"self.assertEqual(VAR_14.status_code, 200)\n",
"self.assertContains(VAR_14, 'Download Uncurated Chemicals')\n",
"VAR_15 = RawChem.objects.filter(dsstox_id__isnull=True).first()\n",
"VAR_14 = self.client.get('/dl_raw_chems/')\n",
"VAR_... | [
"def test_download_raw_chem_button(self):...\n",
"response = self.client.get('/get_data/')\n",
"self.assertEqual(response.status_code, 200)\n",
"self.assertContains(response, 'Download Uncurated Chemicals')\n",
"rc = RawChem.objects.filter(dsstox_id__isnull=True).first()\n",
"response = self.client.get('/... | [
0,
0,
0,
6,
6,
6,
6,
6,
6,
6,
0,
6,
6,
6,
0,
6
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def __init__(self, VAR_1=None, VAR_2=8888, VAR_3=None, VAR_4=1.0):...\n",
"super(CLASS_0, self).__init__()\n",
"self._addr = Address.from_raw(VAR_1, defaultport=port)\n",
"self._connecttimeout = VAR_4\n",
"self._adapter = None\n",
"self._session = None\n",
"self._breakpoints = VAR_3\n"
] | [
"def __init__(self, addr=None, port=8888, breakpoints=None, connecttimeout=1.0):...\n",
"super(_LifecycleClient, self).__init__()\n",
"self._addr = Address.from_raw(addr, defaultport=port)\n",
"self._connecttimeout = connecttimeout\n",
"self._adapter = None\n",
"self._session = None\n",
"self._breakpoin... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_7(VAR_7, VAR_8):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_7 is None:\n",
"VAR_24 = FUNC_10(VAR_7, VAR_8, VAR_0)\n",
"return VAR_24\n"
] | [
"def decodeRequestToken(token, client_pub_key):...\n",
"\"\"\"docstring\"\"\"\n",
"if token is None:\n",
"decoded_token_data = unpackJWT(token, client_pub_key, SERVER_JWT_PRIVATE_KEY)\n",
"return decoded_token_data\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_18(self):...\n",
"self.run_test_case(self.scenario.delete_load_balancer())\n"
] | [
"def test_z_delete_load_balancer(self):...\n",
"self.run_test_case(self.scenario.delete_load_balancer())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_10(self):...\n",
"self.run_test_case(self.scenario.upsert_load_balancer())\n"
] | [
"def test_b_upsert_load_balancer(self):...\n",
"self.run_test_case(self.scenario.upsert_load_balancer())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"if self.get_dg_folder() != 'no_folder_found':\n",
"return self.get_dg_folder()\n",
"return False\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"if self.get_dg_folder() != 'no_folder_found':\n",
"return self.get_dg_folder()\n",
"return False\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_1(self, VAR_9, VAR_10, VAR_11, VAR_12, VAR_13, VAR_14):...\n",
"VAR_22 = 'string' + \"('%s', '%s', '%s', '%s', '%s', '%s', '%s')\" % (VAR_9,\n datetime.now(), VAR_10, VAR_11, VAR_12, VAR_13, VAR_14)\n",
"self.cur.execute(VAR_22)\n",
"self.conn.commit()\n",
"return self.cur.lastrowid\n"
] | [
"def insert_result_log(self, qid, hoax, fact, unknown, unrelated, conclusion):...\n",
"sql = (\n 'INSERT INTO log_result (id_query, finished_at, hoax_score, fact_score, unknown_score, unrelated_score, conclusion) VALUES'\n + \"('%s', '%s', '%s', '%s', '%s', '%s', '%s')\" % (qid, datetime.now(),\n hoax, ... | [
0,
4,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"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'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"\"\"\"docstring\"\"\"\n",
"self.common.client_login()\n",
"self.common.terminate_connection(VAR_7, VAR_10['host'], VAR_10['initiator'])\n",
"self.common.client_logout()\n"
] | [
"@utils.synchronized('3par', external=True)...\n",
"\"\"\"docstring\"\"\"\n",
"self.common.client_login()\n",
"self.common.terminate_connection(volume, connector['host'], connector[\n 'initiator'])\n",
"self.common.client_logout()\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"VAR_8 = 'test_foo.py'\n",
"VAR_7 = BokChoyTestSuite('', test_spec=spec)\n",
"VAR_1 = 'tests/{}'.format(VAR_8)\n",
"self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name))\n"
] | [
"def test_suite_spec(self):...\n",
"spec = 'test_foo.py'\n",
"suite = BokChoyTestSuite('', test_spec=spec)\n",
"name = 'tests/{}'.format(spec)\n",
"self.assertEqual(suite.cmd, self._expected_command(name=name))\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_24(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_57 = self.getfile(VAR_21, VAR_23=False)\n",
"if VAR_57 == False:\n",
"self.get_path(os.path.dirname(VAR_21)).remove(VAR_57)\n",
"return\n"
] | [
"def remove(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"p = self.getfile(path, follow_symlinks=False)\n",
"if p == False:\n",
"self.get_path(os.path.dirname(path)).remove(p)\n",
"return\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_1(self):...\n",
"VAR_14 = self.get_secure_cookie('user')\n",
"if VAR_14 == None:\n",
"self.render('index.html')\n",
"self.render('postlogin.html')\n",
"return\n",
"return\n"
] | [
"def get(self):...\n",
"cookie_status = self.get_secure_cookie('user')\n",
"if cookie_status == None:\n",
"self.render('index.html')\n",
"self.render('postlogin.html')\n",
"return\n",
"return\n"
] | [
0,
6,
6,
6,
6,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Return'",
"Return'"
] |
[
"def __init__(self, VAR_11):...\n",
"self.content = VAR_11\n"
] | [
"def __init__(self, content):...\n",
"self.content = content\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_8(VAR_2):...\n",
"return FUNC_9(VAR_2, '')\n"
] | [
"def get_all_full(db):...\n",
"return get_full_sql(db, '')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@classmethod...\n",
"\"\"\"docstring\"\"\"\n",
"super(CLASS_0, VAR_0).initArgumentParser(VAR_2, VAR_3=defaults)\n",
"VAR_3 = VAR_3 or {}\n",
"VAR_2.add_argument('--test_component_detail', default='fe', help=\n 'Refinement for component name to create.')\n"
] | [
"@classmethod...\n",
"\"\"\"docstring\"\"\"\n",
"super(GoogleSmokeTestScenario, cls).initArgumentParser(parser, defaults=\n defaults)\n",
"defaults = defaults or {}\n",
"parser.add_argument('--test_component_detail', default='fe', help=\n 'Refinement for component name to create.')\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_0(self, VAR_6: str):...\n",
""
] | [
"def get(self, survey_prefix: str):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"@mock.patch('requests.post', FUNC_0)...\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_4 = '/api/apps/{app_id}/builds'.format(**locals())\n",
"VAR_7 = {'image': 'autotest/example'}\n",
"VAR_5 = self.cl... | [
"@mock.patch('requests.post', mock_import_repository_task)...\n",
"url = '/api/apps'\n",
"response = self.client.post(url)\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
"url = '/api/apps/{app_id}/builds'.format(**locals())\n",
"body = {'image': 'autotest/example'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assi... |
[
"def FUNC_19(self):...\n",
"VAR_16 = self.mox.CreateMock(paramiko.SSHClient)\n",
"VAR_12 = self.mox.CreateMock(paramiko.Channel)\n",
"VAR_17 = self.mox.CreateMock(paramiko.Transport)\n",
"self.mox.StubOutWithMock(self.driver, '_get_output')\n",
"self.mox.StubOutWithMock(VAR_12, 'invoke_shell')\n",
"VAR_... | [
"def test_ssh_execute(self):...\n",
"ssh = self.mox.CreateMock(paramiko.SSHClient)\n",
"chan = self.mox.CreateMock(paramiko.Channel)\n",
"transport = self.mox.CreateMock(paramiko.Transport)\n",
"self.mox.StubOutWithMock(self.driver, '_get_output')\n",
"self.mox.StubOutWithMock(chan, 'invoke_shell')\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_31(self):...\n",
"self.compilation_ko('string')\n"
] | [
"def test_nonopened_tests_list(self):...\n",
"self.compilation_ko(\n \"\"\"\nif anyof header :is \"Sender\" \"me@example.com\",\n header :is \"Sender\" \"myself@example.com\") {\n fileinto \"trash\";\n}\n\"\"\"\n )\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@cached_property...\n",
"\"\"\"docstring\"\"\"\n",
"return [VAR_46 for VAR_46 in self.fields if not VAR_46.is_attribute]\n"
] | [
"@cached_property...\n",
"\"\"\"docstring\"\"\"\n",
"return [f for f in self.fields if not f.is_attribute]\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_10(self, VAR_14):...\n",
""
] | [
"def is_text(self, col_name):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_1(VAR_1, VAR_2, VAR_3):...\n",
"VAR_6 = (\n \"\"\"INSERT INTO dialogUser (dialog_id, user_id, permission)\nVALUES (%d, %d, %d)\"\"\"\n % VAR_2, VAR_1, VAR_3)\n",
"return {'status': 1}\n"
] | [
"def db_addUserInDialog(userID, dialogID, permission):...\n",
"sql = (\n \"\"\"INSERT INTO dialogUser (dialog_id, user_id, permission)\nVALUES (%d, %d, %d)\"\"\"\n % dialogID, userID, permission)\n",
"return {'status': 1}\n"
] | [
0,
4,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def __hash__(self):...\n",
"return self._hash\n"
] | [
"def __hash__(self):...\n",
"return self._hash\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_11(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_24 = self.getfile(VAR_21)\n",
"return False\n",
"return VAR_24[VAR_2] == VAR_13\n"
] | [
"def isfile(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"f = self.getfile(path)\n",
"return False\n",
"return f[A_TYPE] == T_FILE\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"super(CLASS_1, self).prepare()\n",
"self._ = {'id': '', 'title': '', 'content': '', 'is_private': False,\n 'group': '', 'tmpatts': [], 'atts': [], 'tags': [], 'alert': ''}\n"
] | [
"def prepare(self):...\n",
"super(EditAnnHandler, self).prepare()\n",
"self._ = {'id': '', 'title': '', 'content': '', 'is_private': False,\n 'group': '', 'tmpatts': [], 'atts': [], 'tags': [], 'alert': ''}\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"\"\"\"\nCreated on 6 Feb 2018\n\n@author: Teodor Gherasim Nistor\n\n\"\"\"\n",
"import os.path\n",
"import re\n",
"from beamr.lexers import imageLexer\n",
"from beamr.parsers import imageParser\n",
"from beamr.debug import debug, warn\n",
"def __init__(self, VAR_0):...\n",
"self.txt = VAR_0\n",
"de... | [
"\"\"\"\nCreated on 6 Feb 2018\n\n@author: Teodor Gherasim Nistor\n\n\"\"\"\n",
"import os.path\n",
"import re\n",
"from beamr.lexers import imageLexer\n",
"from beamr.parsers import imageParser\n",
"from beamr.debug import debug, warn\n",
"def __init__(self, txt):...\n",
"self.txt = txt\n",
"def __... | [
0,
0,
0,
2,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Return'"
] |
[
"def FUNC_25(self):...\n",
"return self._picture\n"
] | [
"def picture(self):...\n",
"return self._picture\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@auth.autologin...\n",
"VAR_12 = logscraper._log_request_id(VAR_0)\n",
"if not VAR_12:\n",
"self.abort(404, detail='Request id was not found.')\n",
"self.response.write(template.render('ereporter2/request.html', {'request':\n VAR_12}))\n"
] | [
"@auth.autologin...\n",
"data = logscraper._log_request_id(request_id)\n",
"if not data:\n",
"self.abort(404, detail='Request id was not found.')\n",
"self.response.write(template.render('ereporter2/request.html', {'request':\n data}))\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"return self.groups\n"
] | [
"def get_groups(self):...\n",
"return self.groups\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_29(self, VAR_77):...\n",
"def FUNC_39(VAR_101):...\n",
"VAR_101.priority = VAR_77\n",
"return VAR_101\n"
] | [
"def priority(self, priority):...\n",
"def decorate(ruleinfo):...\n",
"ruleinfo.priority = priority\n",
"return ruleinfo\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_10):...\n",
"return '%s%s' % (self.configuration.iscsi_target_prefix, VAR_10['name'])\n"
] | [
"def _build_iscsi_target_name(self, volume):...\n",
"return '%s%s' % (self.configuration.iscsi_target_prefix, volume['name'])\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(self, VAR_3):...\n",
"VAR_20 = VAR_3.value.upper()\n",
"if VAR_3.type == 'ID':\n",
"if not VAR_20 in self.spdx.licenses:\n",
"if VAR_3.type == 'EXC':\n",
"self.lastid = VAR_20\n",
"if VAR_20 not in self.spdx.exceptions:\n",
"if VAR_3.type != 'WITH':\n",
"if self.lastid not in self.spdx.e... | [
"def validate(self, tok):...\n",
"id = tok.value.upper()\n",
"if tok.type == 'ID':\n",
"if not id in self.spdx.licenses:\n",
"if tok.type == 'EXC':\n",
"self.lastid = id\n",
"if id not in self.spdx.exceptions:\n",
"if tok.type != 'WITH':\n",
"if self.lastid not in self.spdx.exceptions[id]:\n",
"se... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Assign'"
] |
[
"def FUNC_1():...\n",
"print('-' * 70)\n"
] | [
"def divider():...\n",
"print('-' * 70)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = '/api/apps'\n",
"VAR_3 = self.client.post(VAR_2)\n",
"self.assertEqual(VAR_3.status_code, 201)\n",
"VAR_4 = VAR_3.data['id']\n",
"self.assertIn('structure', VAR_3.data)\n",
"self.assertEqual(VAR_3.data['structure'], {})\n",
"VAR_7 = App.o... | [
"def test_app_structure_is_valid_json(self):...\n",
"\"\"\"docstring\"\"\"\n",
"url = '/api/apps'\n",
"response = self.client.post(url)\n",
"self.assertEqual(response.status_code, 201)\n",
"app_id = response.data['id']\n",
"self.assertIn('structure', response.data)\n",
"self.assertEqual(response.data[... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_13(self, *VAR_16, **VAR_10):...\n",
"if not self.is_group_user(VAR_8):\n",
"return VAR_7(self, *VAR_16, **kwargs)\n"
] | [
"def wrapper(self, *args, **kwargs):...\n",
"if not self.is_group_user(group):\n",
"return method(self, *args, **kwargs)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'"
] |
[
"def FUNC_1(VAR_4, VAR_5=2):...\n",
"VAR_24 = iter(VAR_4)\n",
"VAR_25 = []\n",
"for e in range(0, VAR_5):\n",
"VAR_25.append(next(VAR_24))\n",
"yield VAR_25\n",
"for e in VAR_24:\n",
"VAR_25 = VAR_25[1:] + [e]\n",
"yield VAR_25\n"
] | [
"def window(iterable, size=2):...\n",
"i = iter(iterable)\n",
"win = []\n",
"for e in range(0, size):\n",
"win.append(next(i))\n",
"yield win\n",
"for e in i:\n",
"win = win[1:] + [e]\n",
"yield win\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'",
"For",
"Assign'",
"Expr'"
] |
[
"def FUNC_8(VAR_6):...\n",
"VAR_12 = f\"\"\"\n INSERT INTO {VAR_3} (user_id)\n VALUES ({VAR_6})\n \"\"\"\n",
"VAR_14 = create_connection()\n",
"VAR_14.close()\n",
"VAR_15 = VAR_14.cursor()\n",
"VAR_15.execute(VAR_12)\n",
"VAR_14.commit()\n",
"return 'Ok'\n"
] | [
"def create_invoice(userId):...\n",
"sql_query = f\"\"\"\n INSERT INTO {INVOICES_TABLE} (user_id)\n VALUES ({userId})\n \"\"\"\n",
"connection = create_connection()\n",
"connection.close()\n",
"cursor = connection.cursor()\n",
"cursor.execute(sql_query)\n",
"connection.c... | [
0,
4,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"import sqlite3\n",
"from sqlite3 import Error\n",
"import pandas as pd\n",
"import sys\n",
"import logging\n",
"VAR_0 = logging.getLogger(__name__)\n",
"VAR_1 = logging.StreamHandler(sys.stdout)\n",
"VAR_1.setFormatter(logging.Formatter(\n '%(asctime)s - %(name)s - %(levelname)s - %(message)s - %(... | [
"import sqlite3\n",
"from sqlite3 import Error\n",
"import pandas as pd\n",
"import sys\n",
"import logging\n",
"logger = logging.getLogger(__name__)\n",
"log_handler = logging.StreamHandler(sys.stdout)\n",
"log_handler.setFormatter(logging.Formatter(\n '%(asctime)s - %(name)s - %(levelname)s - %(m... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"FunctionDef'",
"Assign'",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_19(self):...\n",
"VAR_57 = frappe.get_hooks('permission_query_conditions', {}).get(self.\n doctype, [])\n",
"if VAR_57:\n",
"VAR_33 = []\n",
"for method in VAR_57:\n",
"VAR_71 = frappe.call(frappe.get_attr(method), self.user)\n",
"return ' and '.join(VAR_33) if VAR_33 else None\n",
"if VA... | [
"def get_permission_query_conditions(self):...\n",
"condition_methods = frappe.get_hooks('permission_query_conditions', {}).get(\n self.doctype, [])\n",
"if condition_methods:\n",
"conditions = []\n",
"for method in condition_methods:\n",
"c = frappe.call(frappe.get_attr(method), self.user)\n",
"retu... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"For",
"Assign'",
"Return'",
"Condition",
"Expr'"
] |
[
"def __init__(self):...\n",
"super().__init__('Worker was interrupted at runtime')\n"
] | [
"def __init__(self):...\n",
"super().__init__('Worker was interrupted at runtime')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def __init__(self, **VAR_1):...\n",
"super(CLASS_0, self).__init__(**kwargs)\n",
"self.paths = dict()\n"
] | [
"def __init__(self, **kwargs):...\n",
"super(Dispatcher, self).__init__(**kwargs)\n",
"self.paths = dict()\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'"
] |
[
"def FUNC_11(self):...\n",
"self.run_test_case(self.scenario.create_instances())\n"
] | [
"def test_b_create_server_group(self):...\n",
"self.run_test_case(self.scenario.create_instances())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_0():...\n",
"pygame.init()\n",
"VAR_0 = 1360\n",
"VAR_1 = 760\n",
"VAR_2 = pygame.display.set_mode((VAR_0, VAR_1))\n",
"VAR_2.fill((0, 0, 0))\n",
"VAR_3 = Graph(34, 19)\n",
"VAR_4 = GraphVisual(VAR_3, 40, VAR_2)\n",
"VAR_5 = pygame.rect.Rect(3, 363, 36, 36)\n",
"VAR_6 = pygame.rect.Rect(... | [
"def main():...\n",
"pygame.init()\n",
"screen_width = 1360\n",
"screen_height = 760\n",
"screen = pygame.display.set_mode((screen_width, screen_height))\n",
"screen.fill((0, 0, 0))\n",
"grid = Graph(34, 19)\n",
"visual_graph = GraphVisual(grid, 40, screen)\n",
"start_square = pygame.rect.Rect(3, 36... | [
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
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,
0,
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'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"For",
"Condition",
"Expr... |
[
"import copy\n",
"import logging\n",
"import os\n",
"import sflock\n",
"from cuckoo.common.config import emit_options\n",
"from cuckoo.common.exceptions import CuckooOperationalError\n",
"from cuckoo.common.files import Folders, Files, Storage\n",
"from cuckoo.common.utils import validate_url, validat... | [
"import copy\n",
"import logging\n",
"import os\n",
"import sflock\n",
"from cuckoo.common.config import emit_options\n",
"from cuckoo.common.exceptions import CuckooOperationalError\n",
"from cuckoo.common.files import Folders, Files, Storage\n",
"from cuckoo.common.utils import validate_url, validat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"... |
[
"\"\"\"\nDownload and prepare training and fixtures data \nfrom various leagues.\n\"\"\"\n",
"from os.path import join\n",
"from itertools import product\n",
"from difflib import SequenceMatcher\n",
"from sqlite3 import connect\n",
"from argparse import ArgumentParser, RawDescriptionHelpFormatter\n",
"f... | [
"\"\"\"\nDownload and prepare training and fixtures data \nfrom various leagues.\n\"\"\"\n",
"from os.path import join\n",
"from itertools import product\n",
"from difflib import SequenceMatcher\n",
"from sqlite3 import connect\n",
"from argparse import ArgumentParser, RawDescriptionHelpFormatter\n",
"f... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(VAR_3, VAR_2, VAR_4, VAR_5=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_5 is not None and len(VAR_5) > 0:\n",
"VAR_27 = '/'.join(VAR_5)\n",
"VAR_5 = []\n",
"VAR_28 = '/' + VAR_4 + '/' + VAR_27 + '/'\n",
"VAR_27 = ''\n",
"VAR_29 = VAR_2 + '/' + VAR_27\n",
"print('[Setup][FTP] Error: C... | [
"def fetch_data_via_ftp_recursive(ftp, local_directory, remote_directory,...\n",
"\"\"\"docstring\"\"\"\n",
"if remote_subdirs_list is not None and len(remote_subdirs_list) > 0:\n",
"remote_path_relative = '/'.join(remote_subdirs_list)\n",
"remote_subdirs_list = []\n",
"remote_path_absolute = ('/' + remot... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Condition"... |
[
"def FUNC_7(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.check_image_exists()\n",
"if not self.security_groups:\n",
"self.security_groups[self.tenant_id] = self.verify(25, self.\n _create_security_group, 1, 'Security group can not be created.',\n 'security group creation', self.compute_client)\n",
... | [
"def test_008_check_public_instance_connectivity_from_instance(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.check_image_exists()\n",
"if not self.security_groups:\n",
"self.security_groups[self.tenant_id] = self.verify(25, self.\n _create_security_group, 1, 'Security group can not be created.',\n 's... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"VAR_17 = self.args.nw\n",
"VAR_18 = []\n",
"VAR_19 = time.time()\n",
"for nfile, (p_field, p_file, p_data) in enumerate(self.parser.gen):\n",
"VAR_37 = os.devnull\n",
"VAR_20 = time.time() - VAR_19\n",
"if not VAR_17:\n",
"VAR_21 = sum(x[0] for x in VAR_18)\n",
"VAR_37 =... | [
"def handle_plain_upload(self):...\n",
"nullwrite = self.args.nw\n",
"files = []\n",
"t0 = time.time()\n",
"for nfile, (p_field, p_file, p_data) in enumerate(self.parser.gen):\n",
"fn = os.devnull\n",
"td = time.time() - t0\n",
"if not nullwrite:\n",
"sz_total = sum(x[0] for x in files)\n",
"fn = ... | [
0,
0,
0,
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'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"AugAssign'",
"Condition",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"For",
"AugAssign'",
"Expr'",
... |
[
"def FUNC_7(VAR_24):...\n",
"for VAR_27 in VAR_24:\n",
"if VAR_27['submittable']:\n",
"VAR_27.update({'submission_count': 0, 'submissions': [], 'best_submission':\n None, 'points': 0, 'passed': VAR_27['points_to_pass'] == 0, 'graded': \n False, 'unofficial': False})\n",
"FUNC_7(VAR_27.get('children'))... | [
"def r_augment(children):...\n",
"for entry in children:\n",
"if entry['submittable']:\n",
"entry.update({'submission_count': 0, 'submissions': [], 'best_submission':\n None, 'points': 0, 'passed': entry['points_to_pass'] == 0, 'graded': \n False, 'unofficial': False})\n",
"r_augment(entry.get('childr... | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_10):...\n",
"return '%s%s' % (self.configuration.iscsi_target_prefix, VAR_10['name'])\n"
] | [
"def _build_iscsi_target_name(self, volume):...\n",
"return '%s%s' % (self.configuration.iscsi_target_prefix, volume['name'])\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"VAR_23 = self.common.create_volume(VAR_7)\n",
"self.common.client_logout()\n",
"return {'metadata': VAR_23}\n"
] | [
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"metadata = self.common.create_volume(volume)\n",
"self.common.client_logout()\n",
"return {'metadata': metadata}\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def __init__(self, VAR_18, VAR_19):...\n",
"\"\"\"docstring\"\"\"\n",
"self.auth = VAR_18\n",
"self.data = None\n",
"self.station_data = None\n",
"self.station = VAR_19\n"
] | [
"def __init__(self, auth, station):...\n",
"\"\"\"docstring\"\"\"\n",
"self.auth = auth\n",
"self.data = None\n",
"self.station_data = None\n",
"self.station = station\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_1(self, **VAR_3):...\n",
"VAR_13 = super().get_context_data(**kwargs)\n",
"VAR_13['articles'] = self.object.article_set.all()\n",
"VAR_13['form'] = CLASS_1()\n",
"return VAR_13\n"
] | [
"def get_context_data(self, **kwargs):...\n",
"context = super().get_context_data(**kwargs)\n",
"context['articles'] = self.object.article_set.all()\n",
"context['form'] = CommentForm()\n",
"return context\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_1():...\n",
"VAR_3 = Context().list_devices(ID_VENDOR_ID='04b4', ID_MODEL_ID='0008')\n",
"VAR_2 = {}\n",
"for VAR_33 in VAR_3:\n",
"if 'DEVLINKS' in VAR_33:\n",
"return VAR_2\n",
"VAR_2[VAR_33['DEVNAME']] = VAR_33['ID_SERIAL_SHORT']\n"
] | [
"def find_uart_serials():...\n",
"uarts = Context().list_devices(ID_VENDOR_ID='04b4', ID_MODEL_ID='0008')\n",
"serials = {}\n",
"for uart in uarts:\n",
"if 'DEVLINKS' in uart:\n",
"return serials\n",
"serials[uart['DEVNAME']] = uart['ID_SERIAL_SHORT']\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"For",
"Condition",
"Return'",
"Assign'"
] |
[
"def __bool__(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return True\n"
] | [
"def __bool__(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return True\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_1(self, VAR_2, VAR_4=None, *VAR_5, **VAR_6):...\n",
"VAR_2 = db.get_dataset(VAR_2)\n",
"if VAR_4:\n",
"VAR_0 = VAR_2.versions.where(db.DatasetVersion.version == VAR_4).get()\n",
"VAR_0 = VAR_2.current_version.get()\n",
"VAR_12 = []\n",
"for f in VAR_0.files:\n",
"VAR_12.append(db.build_dict_... | [
"def get(self, dataset, version=None, *args, **kwargs):...\n",
"dataset = db.get_dataset(dataset)\n",
"if version:\n",
"dataset_version = dataset.versions.where(db.DatasetVersion.version == version\n ).get()\n",
"dataset_version = dataset.current_version.get()\n",
"ret = []\n",
"for f in dataset_vers... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"For",
"Expr'",
"Expr'"
] |
[
"def FUNC_4(self, VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"return self._relationships[VAR_7.entity_attr]\n"
] | [
"def get_relationship(self, attribute):...\n",
"\"\"\"docstring\"\"\"\n",
"return self._relationships[attribute.entity_attr]\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@integration_synonym_api...\n",
"FUNC_2(VAR_2)\n",
"FUNC_3(VAR_2, 'KLASS', VAR_7='1')\n",
"FUNC_5(VAR_4, VAR_5, VAR_11='CLASS', VAR_10=[{'name': '----CLASS'}, {'name':\n 'KLASS'}])\n"
] | [
"@integration_synonym_api...\n",
"clean_database(solr)\n",
"seed_database_with(solr, 'KLASS', id='1')\n",
"verify_results(client, jwt, query='CLASS', expected=[{'name': '----CLASS'},\n {'name': 'KLASS'}])\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def __init__(self, *VAR_3, **VAR_4):...\n",
"super(CLASS_1, self).__init__(*VAR_3, **kwargs)\n"
] | [
"def __init__(self, *args, **kwargs):...\n",
"super(SanISCSIDriver, self).__init__(*args, **kwargs)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_4(self, VAR_2):...\n",
"if self == VAR_2:\n",
"if VAR_2 not in self.child_groups:\n",
"self.child_groups.append(VAR_2)\n",
"VAR_2.depth = max([self.depth + 1, VAR_2.depth])\n",
"VAR_2._check_children_depth()\n",
"if self.name not in [VAR_12.name for VAR_12 in VAR_2.parent_groups]:\n",
"VAR_2... | [
"def add_child_group(self, group):...\n",
"if self == group:\n",
"if group not in self.child_groups:\n",
"self.child_groups.append(group)\n",
"group.depth = max([self.depth + 1, group.depth])\n",
"group._check_children_depth()\n",
"if self.name not in [g.name for g in group.parent_groups]:\n",
"group.... | [
0,
0,
0,
0,
1,
1,
0,
0,
0,
0,
1
] | [
"FunctionDef'",
"Condition",
"Condition",
"Expr'",
"Assign'",
"Expr'",
"For",
"Expr'",
"Expr'",
"For",
"Expr'"
] |
[
"def FUNC_25(VAR_6):...\n",
"return FUNC_8(VAR_6, 'must-revalidate')\n"
] | [
"def validate_cache_must_revalidate(page):...\n",
"return validate_cache_control_header(page, 'must-revalidate')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_15(self, VAR_17, VAR_18):...\n",
"if VAR_6 in VAR_18.bookmarks:\n",
"VAR_29 = ((x, None) if x not in VAR_17.collections else (x, VAR_17.\n collections[x]) for x in VAR_17.parameters.keys())\n",
"self._store.append(dict(VAR_29))\n"
] | [
"def test(self, pathctx, levelctx):...\n",
"if bookmark in levelctx.bookmarks:\n",
"found = ((x, None) if x not in pathctx.collections else (x, pathctx.\n collections[x]) for x in pathctx.parameters.keys())\n",
"self._store.append(dict(found))\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Expr'"
] |
[
"from flask import Flask, request\n",
"from db import Database\n",
"from datetime import datetime, timedelta\n",
"from log import Logger\n",
"import sql_queries\n",
"import simplejson\n",
"VAR_0 = Logger().logger\n",
"VAR_1 = Flask(__name__)\n",
"VAR_2 = 40327\n",
"VAR_3 = Database()\n",
"VAR_4 ... | [
"from flask import Flask, request\n",
"from db import Database\n",
"from datetime import datetime, timedelta\n",
"from log import Logger\n",
"import sql_queries\n",
"import simplejson\n",
"logger = Logger().logger\n",
"app = Flask(__name__)\n",
"port_number = 40327\n",
"database = Database()\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4
] | [
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"db.session.add(self)\n",
"db.session.commit()\n"
] | [
"def save(self):...\n",
"\"\"\"docstring\"\"\"\n",
"db.session.add(self)\n",
"db.session.commit()\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'"
] |
[
"@gen.coroutine...\n",
"VAR_17 = VAR_4.find()\n",
"VAR_17.sort([('date', -1)]).limit(1)\n",
"VAR_18 = None\n",
"while (yield VAR_17.fetch_next):\n",
"VAR_18 = VAR_17.next_object()\n",
"if VAR_18:\n",
"VAR_2 = VAR_18['date']\n",
"VAR_26 = FUNC_4()\n",
"VAR_26 = FUNC_4(VAR_3=date)\n",
"if len(VAR_... | [
"@gen.coroutine...\n",
"cursor = collection.find()\n",
"cursor.sort([('date', -1)]).limit(1)\n",
"document = None\n",
"while (yield cursor.fetch_next):\n",
"document = cursor.next_object()\n",
"if document:\n",
"date = document['date']\n",
"articles = build_json_from_raw_data()\n",
"articles = bui... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'"
] |
[
"@memoized_method...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_16 = Java.global_instance()\n",
"VAR_17 = ScalaPlatform.global_instance()\n",
"def FUNC_16(VAR_18, VAR_19):...\n",
"VAR_25 = VAR_18.options_scope\n",
"return VAR_18.tool_classpath_from_products(self._products, VAR_19, VAR_25=scope\n )\n"
] | [
"@memoized_method...\n",
"\"\"\"docstring\"\"\"\n",
"java_options_src = Java.global_instance()\n",
"scala_options_src = ScalaPlatform.global_instance()\n",
"def cp(instance, toolname):...\n",
"scope = instance.options_scope\n",
"return instance.tool_classpath_from_products(self._products, toolname,\n ... | [
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_42(self):...\n",
"VAR_54 = 0\n",
"for VAR_40, VAR_41 in sorted(self._names.items(), VAR_44=lambda item: item[\n",
"VAR_57, VAR_42 = VAR_41\n",
"for item in self[VAR_54:]:\n",
"if VAR_42 is None:\n",
"yield None, item\n",
"VAR_42 = VAR_57 + 1\n",
"if VAR_57 > VAR_54:\n",
"for item in self... | [
"def allitems(self):...\n",
"next = 0\n",
"for name, index in sorted(self._names.items(), key=lambda item: item[1][0]):\n",
"start, end = index\n",
"for item in self[next:]:\n",
"if end is None:\n",
"yield None, item\n",
"end = start + 1\n",
"if start > next:\n",
"for item in self[next:start]:\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"For",
"Condition",
"Expr'",
"Assign'",
"Condition",
"For",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def FUNC_4(self, VAR_8=False):...\n",
"self.install_prerequisites()\n",
"self.port = FUNC_2()\n",
"if VAR_8:\n",
"VAR_23 = None\n",
"VAR_23 = subprocess.PIPE\n",
"VAR_24 = None\n",
"VAR_24 = subprocess.PIPE\n",
"VAR_17 = os.environ.copy()\n",
"VAR_17['LANGUAGE'] = 'en'\n",
"VAR_18, self.tmp_db ... | [
"def start_server(self, verbose=False):...\n",
"self.install_prerequisites()\n",
"self.port = find_free_port()\n",
"if verbose:\n",
"stdout = None\n",
"stdout = subprocess.PIPE\n",
"stderr = None\n",
"stderr = subprocess.PIPE\n",
"env = os.environ.copy()\n",
"env['LANGUAGE'] = 'en'\n",
"h, self.... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'"
] |
[
"import fnmatch\n",
"import logging\n",
"from flask import abort, request, g\n",
"from flask import url_for\n",
"from functools import wraps\n",
"from confidant import keymanager\n",
"from confidant.app import app\n",
"from confidant.utils import stats\n",
"from confidant.authnz.errors import UserUn... | [
"import fnmatch\n",
"import logging\n",
"from flask import abort, request, g\n",
"from flask import url_for\n",
"from functools import wraps\n",
"from confidant import keymanager\n",
"from confidant.app import app\n",
"from confidant.utils import stats\n",
"from confidant.authnz.errors import UserUn... | [
0,
0,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Condition",
"Return'",
"FunctionDef'",
"Condition",
"Retur... |
[
"def FUNC_40(VAR_63=None):...\n",
"VAR_81 = VAR_20.getWrittenData()\n",
"if VAR_81:\n",
"return FUNC_39(VAR_81)\n"
] | [
"def get_request_written_data(_=None):...\n",
"written_data = request.getWrittenData()\n",
"if written_data:\n",
"return get_str(written_data)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_0(VAR_0):...\n",
"return text_type(VAR_0).translate({ord(u'\"'): u'\"\"', ord(u\"'\"): u\"''\"})\n"
] | [
"def sanitize_for_fts(text):...\n",
"return text_type(text).translate({ord(u'\"'): u'\"\"', ord(u\"'\"): u\"''\"})\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_25(VAR_1, **VAR_6):...\n",
"import json\n",
"import sql\n",
"VAR_45 = sql.get_setting('haproxy_sock_port')\n",
"VAR_15 = 'echo \"show backend\" |nc %s %s' % (VAR_1, VAR_45)\n",
"VAR_41, VAR_42 = FUNC_24(VAR_15)\n",
"VAR_61 = ''\n",
"for line in VAR_41:\n",
"if '#' in line or 'stats' in lin... | [
"def show_backends(serv, **kwargs):...\n",
"import json\n",
"import sql\n",
"haproxy_sock_port = sql.get_setting('haproxy_sock_port')\n",
"cmd = 'echo \"show backend\" |nc %s %s' % (serv, haproxy_sock_port)\n",
"output, stderr = subprocess_execute(cmd)\n",
"ret = ''\n",
"for line in output:\n",
"if ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Import'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Condition",
"Condition",
"Return'",
"Assign'",
"Condition",
"AugAssign'",
"Expr'",
"AugAssign'"
] |
[
"def FUNC_17(*VAR_20, **VAR_7):...\n",
"return DebugAdapter.start_wrapper_script(VAR_10, *VAR_20, **kwargs)\n"
] | [
"def start(*args, **kwargs):...\n",
"return DebugAdapter.start_wrapper_script(script, *args, **kwargs)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_10(self):...\n",
"return self.current_user()['email'].lower()\n"
] | [
"def current_email(self):...\n",
"return self.current_user()['email'].lower()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_34(self, VAR_64):...\n",
"return CLASS_1(VAR_64)\n"
] | [
"def run(self, func):...\n",
"return RuleInfo(func)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@property...\n",
"return self.contexts[-1]\n"
] | [
"@property...\n",
"return self.contexts[-1]\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"@staticmethod...\n",
"def FUNC_13(VAR_9, VAR_7, VAR_11, VAR_10):...\n",
"if VAR_11 == 'POST':\n",
"return CLASS_0.session.post(FUNC_2(VAR_7), VAR_9=ToUtf8Json(data), headers=\n _HEADERS, VAR_10=timeout)\n",
"if VAR_11 == 'GET':\n",
"return CLASS_0.session.get(FUNC_2(VAR_7), headers=_HEADERS, VAR_10=ti... | [
"@staticmethod...\n",
"def SendRequest(data, handler, method, timeout):...\n",
"if method == 'POST':\n",
"return BaseRequest.session.post(_BuildUri(handler), data=ToUtf8Json(data),\n headers=_HEADERS, timeout=timeout)\n",
"if method == 'GET':\n",
"return BaseRequest.session.get(_BuildUri(handler), head... | [
0,
0,
0,
7,
0,
7,
0,
0,
7,
0,
0,
0,
0,
0
] | [
"Condition",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def __enter__(self):...\n",
"return CLASS_0()\n"
] | [
"def __enter__(self):...\n",
"return DBase()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@staticmethod...\n",
"VAR_22 = CLASS_1.get_user_by_username(VAR_4)\n",
"VAR_27 = UserStatsDTO()\n",
"VAR_28 = TaskHistory.query.filter(TaskHistory.user_id == VAR_22.id, \n TaskHistory.action_text != '').all()\n",
"VAR_29 = TaskHistory.query.filter(TaskHistory.user_id == VAR_22.id, \n TaskHistory.acti... | [
"@staticmethod...\n",
"user = UserService.get_user_by_username(username)\n",
"stats_dto = UserStatsDTO()\n",
"actions = TaskHistory.query.filter(TaskHistory.user_id == user.id, \n TaskHistory.action_text != '').all()\n",
"tasks_mapped = TaskHistory.query.filter(TaskHistory.user_id == user.id, \n TaskH... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"For",
"AugAssign'",
"Assign'",
"Retu... |
[
"def FUNC_11(self, VAR_3):...\n",
"VAR_3 = VAR_3.lower().split(', ')\n",
"VAR_8 = sqlite3.connect('data/ed.db').cursor()\n",
"if len(VAR_3) == 1:\n",
"VAR_9 = VAR_8.execute(\n f\"select * from commodities where lower(name)='{VAR_3[0]}'\")\n",
"if len(VAR_3) < 4:\n",
"VAR_7 = VAR_9.fetchone()\n",
"V... | [
"def commodity_search(self, search):...\n",
"search = search.lower().split(', ')\n",
"conn = sqlite3.connect('data/ed.db').cursor()\n",
"if len(search) == 1:\n",
"table = conn.execute(\n f\"select * from commodities where lower(name)='{search[0]}'\")\n",
"if len(search) < 4:\n",
"result = table.fetch... | [
0,
0,
0,
0,
4,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
4,
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Return'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
... |
[
"def FUNC_24(self, VAR_39):...\n",
"for r in VAR_39:\n",
"if not r.name:\n",
"r._comment_count = 0\n",
"if '_comments' in r:\n",
"r._comment_count = len(json.loads(r._comments or '[]'))\n"
] | [
"def add_comment_count(self, result):...\n",
"for r in result:\n",
"if not r.name:\n",
"r._comment_count = 0\n",
"if '_comments' in r:\n",
"r._comment_count = len(json.loads(r._comments or '[]'))\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Assign'",
"Condition",
"Assign'"
] |
[
"from django.http import HttpResponse, HttpResponseRedirect\n",
"from django.shortcuts import get_object_or_404, render\n",
"from django.views.generic import ListView, DetailView\n",
"from pure_pagination.mixins import PaginationMixin\n",
"from django.db.models import Q\n",
"from .models import Event, Att... | [
"from django.http import HttpResponse, HttpResponseRedirect\n",
"from django.shortcuts import get_object_or_404, render\n",
"from django.views.generic import ListView, DetailView\n",
"from pure_pagination.mixins import PaginationMixin\n",
"from django.db.models import Q\n",
"from .models import Event, Att... | [
6,
6,
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'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assig... |
[
"def FUNC_3(self):...\n",
"return self.data['notifications']\n"
] | [
"def notifications(self):...\n",
"return self.data['notifications']\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"\"\"\"Volume driver for Dell EqualLogic Storage.\"\"\"\n",
"import functools\n",
"import random\n",
"import eventlet\n",
"from eventlet import greenthread\n",
"import greenlet\n",
"from oslo.config import cfg\n",
"from cinder import exception\n",
"from cinder.openstack.common import excutils\n",
... | [
"\"\"\"Volume driver for Dell EqualLogic Storage.\"\"\"\n",
"import functools\n",
"import random\n",
"import eventlet\n",
"from eventlet import greenthread\n",
"import greenlet\n",
"from oslo.config import cfg\n",
"from cinder import exception\n",
"from cinder.openstack.common import excutils\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
] | [
"Expr'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Conditi... |
[
"@VAR_0.route('/clear')...\n",
""
] | [
"@app.route('/clear')...\n",
""
] | [
0,
0
] | [
"Condition",
"Condition"
] |
[
"def FUNC_7(self):...\n",
"self.assertEquals('123456 test course: Fall 2011 day 1', str(self.\n current_course_instance))\n",
"self.assertEquals('123456 test course: Secret super course', str(self.\n hidden_course_instance))\n"
] | [
"def test_course_instance_unicode_string(self):...\n",
"self.assertEquals('123456 test course: Fall 2011 day 1', str(self.\n current_course_instance))\n",
"self.assertEquals('123456 test course: Secret super course', str(self.\n hidden_course_instance))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"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'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.