lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"@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_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'"
] |
[
"def __init__(self, VAR_19, VAR_20):...\n",
"self.first = VAR_19\n",
"self.second = VAR_20\n"
] | [
"def __init__(self, first, second):...\n",
"self.first = first\n",
"self.second = second\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'"
] |
[
"def FUNC_20(self, VAR_28, **VAR_6):...\n",
"\"\"\"docstring\"\"\"\n",
"self.abort(VAR_28, json=kwargs, VAR_29={'Content-Type': self.CONTENT_TYPE_FULL}\n )\n"
] | [
"def abort_with_error(self, http_code, **kwargs):...\n",
"\"\"\"docstring\"\"\"\n",
"self.abort(http_code, json=kwargs, headers={'Content-Type': self.\n CONTENT_TYPE_FULL})\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_0():...\n",
"\"\"\"docstring\"\"\"\n",
"return {'partition': {'shutdown': FUNC_9, 'ident': FUNC_14}, 'lvm': {\n 'shutdown': FUNC_6, 'ident': FUNC_10}, 'crypt': {'shutdown': FUNC_7,\n 'ident': FUNC_11}, 'raid': {'shutdown': FUNC_8, 'ident': FUNC_12},\n 'bcache': {'shutdown': FUNC_5, 'ident': F... | [
"def _define_handlers_registry():...\n",
"\"\"\"docstring\"\"\"\n",
"return {'partition': {'shutdown': wipe_superblock, 'ident':\n identify_partition}, 'lvm': {'shutdown': shutdown_lvm, 'ident':\n identify_lvm}, 'crypt': {'shutdown': shutdown_crypt, 'ident':\n identify_crypt}, 'raid': {'shutdown': shut... | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_13(self, VAR_9):...\n",
"if not self.logged_in():\n",
"print('shrub: unauthenticated; use \"login [username] to log in first')\n",
"VAR_20 = self.send_cmd('list_comments{} {}'.format(self.insecure_mode, VAR_9))\n",
"return\n",
"print(VAR_20)\n"
] | [
"def do_list_comments(self, line):...\n",
"if not self.logged_in():\n",
"print('shrub: unauthenticated; use \"login [username] to log in first')\n",
"response = self.send_cmd('list_comments{} {}'.format(self.insecure_mode, line))\n",
"return\n",
"print(response)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Expr'"
] |
[
"def FUNC_7(self):...\n",
"super().get_resource_objects()\n",
"VAR_25 = self._get_kwarg(self.file_kw)\n",
"VAR_26 = self._get_kwarg(self.file_name_kw)\n",
"self.file = get_object_or_404(SubmittedFile, id=file_id, submission=self.\n submission)\n",
"if self.file.filename != VAR_26:\n"
] | [
"def get_resource_objects(self):...\n",
"super().get_resource_objects()\n",
"file_id = self._get_kwarg(self.file_kw)\n",
"file_name = self._get_kwarg(self.file_name_kw)\n",
"self.file = get_object_or_404(SubmittedFile, id=file_id, submission=self.\n submission)\n",
"if self.file.filename != file_name:\... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Condition"
] |
[
"def FUNC_4(self):...\n",
"VAR_13 = self.data_group\n",
"VAR_14 = self.get_abstract_filename()\n",
"return f'/media/{VAR_13.fs_id}/pdf/{VAR_14}'\n"
] | [
"def pdf_url(self):...\n",
"dg = self.data_group\n",
"fn = self.get_abstract_filename()\n",
"return f'/media/{dg.fs_id}/pdf/{fn}'\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_10(self, VAR_9):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.logged_in():\n",
"print(\n 'shrub: login: already logged in; restart shrub to login as a different user'\n )\n",
"VAR_19 = VAR_9.split()\n",
"return\n",
"if not len(VAR_19) == 1:\n",
"print('login: incorrect arguments; input o... | [
"def do_login(self, line):...\n",
"\"\"\"docstring\"\"\"\n",
"if self.logged_in():\n",
"print(\n 'shrub: login: already logged in; restart shrub to login as a different user'\n )\n",
"linesplit = line.split()\n",
"return\n",
"if not len(linesplit) == 1:\n",
"print('login: incorrect arguments; in... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def FUNC_9(VAR_18, VAR_19):...\n",
"VAR_20 = None\n",
"if line.startswith(VAR_18):\n",
"VAR_20 = line.rstrip()[len(VAR_18):]\n",
"return VAR_20 or VAR_19\n"
] | [
"def extract(comment, current_value):...\n",
"value = None\n",
"if line.startswith(comment):\n",
"value = line.rstrip()[len(comment):]\n",
"return value or current_value\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_36(self, VAR_51):...\n",
"VAR_69, VAR_73 = self.post('/mails/unread', json.dumps({'idents': VAR_51}))\n",
"return VAR_69\n"
] | [
"def mark_many_as_unread(self, idents):...\n",
"res, req = self.post('/mails/unread', json.dumps({'idents': idents}))\n",
"return res\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_3(VAR_2):...\n",
"VAR_5 = merge_yaml_files(VAR_2)\n",
"VAR_6 = None\n",
"VAR_7 = os.path.getmtime(VAR_2)\n",
"return VAR_5, CLASS_0(VAR_6=etag, VAR_7=mtime)\n"
] | [
"def read_config_from_file(path):...\n",
"yaml_config = merge_yaml_files(path)\n",
"etag = None\n",
"mtime = os.path.getmtime(path)\n",
"return yaml_config, Header(etag=etag, mtime=mtime)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_4(VAR_0):...\n",
"\"\"\"docstring\"\"\"\n",
"[VAR_17, VAR_18] = FUNC_2(VAR_0.inf_file)\n",
"VAR_19 = 1\n",
"while not FUNC_10(VAR_0) and VAR_19 < 5:\n",
"if VAR_19 > 1:\n",
"if not FUNC_10(VAR_0):\n",
"print('Failed Attempt #' + str(VAR_19) + ', trying again.')\n",
"VAR_19 += 1\n",
"prin... | [
"def post_ad(args):...\n",
"\"\"\"docstring\"\"\"\n",
"[data, imageFiles] = get_inf_details(args.inf_file)\n",
"attempts = 1\n",
"while not check_ad(args) and attempts < 5:\n",
"if attempts > 1:\n",
"if not check_ad(args):\n",
"print('Failed Attempt #' + str(attempts) + ', trying again.')\n",
"attem... | [
0,
0,
5,
0,
5,
0,
0,
5,
0,
5,
0,
0,
5,
5
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Expr'",
"AugAssign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_12(self, VAR_1, VAR_62=False, VAR_63=False, VAR_4=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if not urllib.parse.urlparse(VAR_1).scheme:\n",
"if not os.path.isabs(VAR_1) and self.included_stack:\n",
"if VAR_1 in self.included:\n",
"VAR_108 = os.path.dirname(self.included_stack[-1])\n",
"VAR_1 =... | [
"def include(self, snakefile, overwrite_first_rule=False, print_compilation=...\n",
"\"\"\"docstring\"\"\"\n",
"if not urllib.parse.urlparse(snakefile).scheme:\n",
"if not os.path.isabs(snakefile) and self.included_stack:\n",
"if snakefile in self.included:\n",
"current_path = os.path.dirname(self.include... | [
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",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_4):...\n",
"VAR_22 = self.profile.user\n",
"if VAR_22.is_authenticated():\n",
"self.exercise.check_submission(VAR_22, no_update=True)\n",
"VAR_23 = []\n",
"for t_exercise in self.exercise.exercises:\n",
"VAR_29 = t_exercise.parent\n",
"VAR_24 = '{}: {} - {}'.format(t_exercise.cou... | [
"def __load_exercisecollection(self, request):...\n",
"user = self.profile.user\n",
"if user.is_authenticated():\n",
"self.exercise.check_submission(user, no_update=True)\n",
"target_exercises = []\n",
"for t_exercise in self.exercise.exercises:\n",
"it = t_exercise.parent\n",
"title = '{}: {} - {}'.f... | [
0,
0,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Assign'",
"Return'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_16(VAR_5, VAR_6):...\n",
"VAR_38 = 5\n",
"VAR_39 = VAR_14 + timedelta(minutes=cache_time) < datetime.now(\n ) if VAR_14 else True\n",
"if not VAR_14 or VAR_39 or VAR_5 not in VAR_15:\n",
"VAR_14 = datetime.now()\n",
"log.info('Returning cached result of %s', VAR_3.__name__)\n",
"VAR_50 = VA... | [
"def func_launcher(feature, feature_type):...\n",
"cache_time = 5\n",
"high_time = when_was_called + timedelta(minutes=cache_time) < datetime.now(\n ) if when_was_called else True\n",
"if not when_was_called or high_time or feature not in result:\n",
"when_was_called = datetime.now()\n",
"log.info('Ret... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'"
] |
[
"def __ne__(self, VAR_1):...\n",
"return not self.__eq__(VAR_1)\n"
] | [
"def __ne__(self, other):...\n",
"return not self.__eq__(other)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(VAR_1, VAR_2):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_2 is None:\n",
"if 'access_token' in VAR_2:\n",
"return FUNC_3(VAR_1, VAR_2)\n",
"if 'oauth_token' in VAR_2 and 'oauth_token_secret' in VAR_2:\n",
"return FUNC_2(VAR_1, VAR_2)\n",
"if 'error' in VAR_2:\n"
] | [
"def response_token_setter(remote, resp):...\n",
"\"\"\"docstring\"\"\"\n",
"if resp is None:\n",
"if 'access_token' in resp:\n",
"return oauth2_token_setter(remote, resp)\n",
"if 'oauth_token' in resp and 'oauth_token_secret' in resp:\n",
"return oauth1_token_setter(remote, resp)\n",
"if 'error' in r... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._icon\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self._icon\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"def FUNC_15(VAR_1, VAR_2, VAR_13, VAR_14, VAR_15):...\n",
"\"\"\"docstring\"\"\"\n",
"flash('Authorization with remote service failed.')\n",
"return redirect('/')\n"
] | [
"def oauth2_handle_error(remote, resp, error_code, error_uri, error_description...\n",
"\"\"\"docstring\"\"\"\n",
"flash('Authorization with remote service failed.')\n",
"return redirect('/')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Return'"
] |
[
"def FUNC_22(VAR_49, **VAR_18):...\n",
"if self._session_responses:\n",
"VAR_64 = self._session_responses[0]\n",
"VAR_18['allow_redirects'] = False\n",
"VAR_20.record_call(VAR_49, **kwargs)\n",
"return VAR_60(VAR_49, **kwargs)\n",
"return VAR_64() if hasattr(VAR_64, '__call__') else VAR_64\n"
] | [
"def _session_send(request, **kwargs):...\n",
"if self._session_responses:\n",
"current_response = self._session_responses[0]\n",
"kwargs['allow_redirects'] = False\n",
"cluster_api.record_call(request, **kwargs)\n",
"return session_send(request, **kwargs)\n",
"return current_response() if hasattr(curre... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"for i in range(27):\n",
"VAR_22 = DataSource.objects.create(title=f'Test_DS_{i}')\n",
"VAR_4 = self.live_server_url + '/datasources/'\n",
"self.browser.get(VAR_4)\n",
"VAR_5 = len(self.browser.find_elements_by_xpath(\n \"//table[@id='sources']/tbody/tr\"))\n",
"self.assertE... | [
"def test_hem(self):...\n",
"for i in range(27):\n",
"ds = DataSource.objects.create(title=f'Test_DS_{i}')\n",
"list_url = self.live_server_url + '/datasources/'\n",
"self.browser.get(list_url)\n",
"row_count = len(self.browser.find_elements_by_xpath(\n \"//table[@id='sources']/tbody/tr\"))\n",
"self... | [
0,
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'",
"For",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Import'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_31(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"return VAR_21\n"
] | [
"def realpath(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"return path\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_17(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.parser.parse_args(['--delete-player'])\n"
] | [
"def test_arg_delete_player(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.parser.parse_args(['--delete-player'])\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"\"\"\"Set of functions for tasks to freeze the data within a GSoCProgram.\n\"\"\"\n",
"__authors__ = ['\"Daniel Hans\" <daniel.m.hans@gmail.com>',\n '\"Lennard de Rijk\" <ljvderijk@gmail.com>']\n",
"import pickle\n",
"from google.appengine.ext import db\n",
"from soc.tasks import responses\n",
"from s... | [
"\"\"\"Set of functions for tasks to freeze the data within a GSoCProgram.\n\"\"\"\n",
"__authors__ = ['\"Daniel Hans\" <daniel.m.hans@gmail.com>',\n '\"Lennard de Rijk\" <ljvderijk@gmail.com>']\n",
"import pickle\n",
"from google.appengine.ext import db\n",
"from soc.tasks import responses\n",
"from s... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"Assign'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@VAR_0.route('/', methods=['GET'])...\n",
"return redirect(url_for('auth.login'))\n"
] | [
"@app.route('/', methods=['GET'])...\n",
"return redirect(url_for('auth.login'))\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_25(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_57 = self.getfile(VAR_21, VAR_23=False)\n",
"if VAR_57 == False:\n",
"if not VAR_57[VAR_6] & FUNC_30.S_IFLNK:\n",
"return VAR_57[VAR_9]\n"
] | [
"def readlink(self, path):...\n",
"\"\"\"docstring\"\"\"\n",
"p = self.getfile(path, follow_symlinks=False)\n",
"if p == False:\n",
"if not p[A_MODE] & stat.S_IFLNK:\n",
"return p[A_TARGET]\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Condition",
"Return'"
] |
[
"def FUNC_1(self, VAR_5, VAR_6):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_13 = 'https://www.kijiji.ca/t-login.html'\n",
"VAR_14 = self.session.get(VAR_13)\n",
"VAR_15 = {'emailOrNickname': VAR_5, 'password': VAR_6, 'rememberMe': 'true',\n '_rememberMe': 'on', 'ca.kijiji.xsrf.token': FUNC_0(VAR_14.text,\n ... | [
"def login(self, username, password):...\n",
"\"\"\"docstring\"\"\"\n",
"login_url = 'https://www.kijiji.ca/t-login.html'\n",
"resp = self.session.get(login_url)\n",
"payload = {'emailOrNickname': username, 'password': password, 'rememberMe':\n 'true', '_rememberMe': 'on', 'ca.kijiji.xsrf.token': get_tok... | [
0,
0,
0,
0,
5,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition"
] |
[
"def FUNC_20(self, VAR_26, *VAR_1, **VAR_2):...\n",
"self.sig_addr = VAR_26\n",
"multiprocessing.Process.start(self, *VAR_1, **kvargs)\n"
] | [
"def start(self, sig_addr, *args, **kvargs):...\n",
"self.sig_addr = sig_addr\n",
"multiprocessing.Process.start(self, *args, **kvargs)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_0(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.filename\n"
] | [
"def getDBFilename(self):...\n",
"\"\"\"docstring\"\"\"\n",
"return self.filename\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"@property...\n",
"VAR_28 = list(self.output)\n",
"if self.benchmark:\n",
"VAR_28.append(self.benchmark)\n",
"return VAR_28\n"
] | [
"@property...\n",
"products = list(self.output)\n",
"if self.benchmark:\n",
"products.append(self.benchmark)\n",
"return products\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_1(self, VAR_3):...\n",
"return '{:,}'.format(result.objects.filter(campaign=record.id).count())\n"
] | [
"def render_results(self, record):...\n",
"return '{:,}'.format(result.objects.filter(campaign=record.id).count())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(VAR_3):...\n",
"return Task('nfs/{}'.format(VAR_0), VAR_1, VAR_2, partial(\n serialize_dashboard_exception, include_http_status=True))(VAR_3)\n"
] | [
"def composed_decorator(func):...\n",
"return Task('nfs/{}'.format(name), metadata, wait_for, partial(\n serialize_dashboard_exception, include_http_status=True))(func)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self, VAR_5):...\n",
"self.parsedConfig = yaml.load_all(VAR_5)\n",
"self.__class__.docConfig.append(self)\n"
] | [
"def __init__(self, txt):...\n",
"self.parsedConfig = yaml.load_all(txt)\n",
"self.__class__.docConfig.append(self)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_1(self, **VAR_3):...\n",
"VAR_5 = super().get_context_data(**kwargs)\n",
"VAR_5['search_form'] = SearchForm()\n",
"VAR_6 = self.kwargs['pk']\n",
"VAR_7 = VT()\n",
"VAR_5['vt_hash'] = VAR_7.getFileReport(VAR_6)\n",
"VAR_5['vt_behavior'] = VAR_7.getFileBehavior(VAR_6)\n",
"VAR_8 = ThreatMiner(... | [
"def get_context_data(self, **kwargs):...\n",
"context = super().get_context_data(**kwargs)\n",
"context['search_form'] = SearchForm()\n",
"filehash = self.kwargs['pk']\n",
"vt = VT()\n",
"context['vt_hash'] = vt.getFileReport(filehash)\n",
"context['vt_behavior'] = vt.getFileBehavior(filehash)\n",
"t... | [
0,
0,
0,
0,
0,
0,
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'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Conditi... |
[
"def FUNC_35(VAR_29):...\n",
"VAR_40 = VAR_29.group('name')\n",
"VAR_16 = VAR_11[VAR_40]\n",
"if VAR_15:\n",
"if VAR_13 and VAR_16 == VAR_14:\n",
"return '{{{}}}'.format(VAR_40)\n",
"if VAR_12:\n",
"return str(VAR_16)\n",
"return VAR_14\n"
] | [
"def format_match(match):...\n",
"name = match.group('name')\n",
"value = wildcards[name]\n",
"if keep_dynamic:\n",
"if fail_dynamic and value == dynamic_fill:\n",
"return '{{{}}}'.format(name)\n",
"if fill_missing:\n",
"return str(value)\n",
"return dynamic_fill\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Return'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_12(self):...\n",
"self.run_test_case(self.scenario.upsert_google_server_group_tags())\n"
] | [
"def Xtest_a_upsert_server_group_tags(self):...\n",
"self.run_test_case(self.scenario.upsert_google_server_group_tags())\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@VAR_0.route('/search_taxon_name/<table>/<expr>', methods=['GET'])...\n",
"VAR_8 = getConnexion()\n",
"VAR_9 = 'string' + VAR_2 + 'string'\n",
"VAR_10 = ['%' + VAR_3 + '%']\n",
"VAR_8.cur.execute(VAR_9, VAR_10)\n",
"VAR_11 = VAR_8.cur.fetchone()[0]\n",
"VAR_8.closeAll()\n",
"return Response(flask.jso... | [
"@addObs.route('/search_taxon_name/<table>/<expr>', methods=['GET'])...\n",
"db = getConnexion()\n",
"sql = \"\"\" SELECT array_to_json(array_agg(row_to_json(r))) FROM(\n SELECT cd_ref, search_name, nom_valide from taxonomie.taxons_\"\"\" + table + \"\"\"\n WHERE search_name ILIKE ... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_22(self, VAR_38):...\n",
"\"\"\"docstring\"\"\"\n",
"if not VAR_38:\n",
"return\n",
"VAR_57 = VAR_38.lower()\n",
"if 'select' in VAR_57 and ' from ' in VAR_57:\n",
"frappe.throw(_('Cannot use sub-query in order by'))\n",
"for field in VAR_38.split(','):\n",
"if '.' in field and field.strip... | [
"def validate_order_by_and_group_by(self, parameters):...\n",
"\"\"\"docstring\"\"\"\n",
"if not parameters:\n",
"return\n",
"_lower = parameters.lower()\n",
"if 'select' in _lower and ' from ' in _lower:\n",
"frappe.throw(_('Cannot use sub-query in order by'))\n",
"for field in parameters.split(','):... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Condition",
"Expr'",
"For",
"Condition",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_14(self):...\n",
"def __init__(self):...\n",
"self._time = 0.0\n",
"def FUNC_28(self):...\n",
"VAR_21 = self._time\n",
"self._time += 0.0001\n",
"return VAR_21\n"
] | [
"def test_timer(self):...\n",
"def __init__(self):...\n",
"self._time = 0.0\n",
"def time(self):...\n",
"ret = self._time\n",
"self._time += 0.0001\n",
"return ret\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Assign'",
"AugAssign'",
"Return'"
] |
[
"def FUNC_7(self, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self._rules:\n",
"if not VAR_10 in self._rules:\n",
"return self._rules[VAR_10]\n"
] | [
"def get_rule(self, name):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self._rules:\n",
"if not name in self._rules:\n",
"return self._rules[name]\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Condition",
"Return'"
] |
[
"def FUNC_0(VAR_0, VAR_1, VAR_2=None, VAR_3=False):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_1 = posixpath.normpath(unquote(VAR_1))\n",
"VAR_1 = VAR_1.lstrip('/')\n",
"VAR_10 = ''\n",
"for VAR_18 in VAR_1.split('/'):\n",
"if not VAR_18:\n",
"if VAR_10 and VAR_1 != VAR_10:\n",
"VAR_17, VAR_18 = os.path... | [
"def serve(request, path, document_root=None, show_indexes=False):...\n",
"\"\"\"docstring\"\"\"\n",
"path = posixpath.normpath(unquote(path))\n",
"path = path.lstrip('/')\n",
"newpath = ''\n",
"for part in path.split('/'):\n",
"if not part:\n",
"if newpath and path != newpath:\n",
"drive, part = os... | [
0,
0,
6,
6,
6,
6,
6,
6,
6,
6,
6,
6,
0,
6,
0,
0,
6,
6,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Condition",
"Assign'",
"Return'",
"Assign'",
"Condition",
"Return'",
"Assign'",
"Assign'",
... |
[
"def FUNC_5(self, VAR_10, VAR_11):...\n",
"VAR_21 = KeepAlive(sess_id=session.sess_id).update_or_expire_session()\n",
"VAR_9 = {'msg': 'pong'}\n",
"if not VAR_21:\n",
"VAR_9.update(VAR_1)\n",
"return VAR_9\n"
] | [
"def _handle_ping_pong(self, data, session):...\n",
"still_alive = KeepAlive(sess_id=session.sess_id).update_or_expire_session()\n",
"msg = {'msg': 'pong'}\n",
"if not still_alive:\n",
"msg.update(LOGIN_REQUIRED_MESSAGE)\n",
"return msg\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_13(self, VAR_7):...\n",
"return int(VAR_7[:len(str(self.mapWidth))].rstrip('-')), int(VAR_7[len(str(\n self.mapHeight)):].rstrip('-'))\n"
] | [
"def IDToCoord(self, ID):...\n",
"return int(ID[:len(str(self.mapWidth))].rstrip('-')), int(ID[len(str(self.\n mapHeight)):].rstrip('-'))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"@abc.abstractmethod...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"@abc.abstractmethod...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"Condition",
"Docstring"
] |
[
"def FUNC_2(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_16 = self.session.get('https://www.kijiji.ca/m-my-ads.html/').text\n",
"return 'Sign Out' in VAR_16\n"
] | [
"def is_logged_in(self):...\n",
"\"\"\"docstring\"\"\"\n",
"index_page_text = self.session.get('https://www.kijiji.ca/m-my-ads.html/').text\n",
"return 'Sign Out' in index_page_text\n"
] | [
0,
0,
5,
5
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Return'"
] |
[
"def __init__(self):...\n",
"super(CLASS_0, self).__init__()\n"
] | [
"def __init__(self):...\n",
"super(BigIpOSUtil, self).__init__()\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"import cgi\n",
"import mysql.connector\n",
"from html import beghtml, endhtml\n",
"VAR_0 = cgi.FieldStorage()\n",
"VAR_1 = VAR_0.getvalue('enzyme_name')\n",
"VAR_2 = VAR_0.getvalue('product_name')\n",
"VAR_3 = VAR_0.getvalue('enzyme_name2')\n",
"VAR_4 = VAR_0.getvalue('mechanism_name')\n",
"VAR_5 =... | [
"import cgi\n",
"import mysql.connector\n",
"from html import beghtml, endhtml\n",
"form = cgi.FieldStorage()\n",
"enzyme_name = form.getvalue('enzyme_name')\n",
"product_name = form.getvalue('product_name')\n",
"enzyme_name2 = form.getvalue('enzyme_name2')\n",
"mechanism_name = form.getvalue('mechani... | [
0,
0,
0,
0,
0,
0,
0,
0,
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,
4,
4,
0,
4,
4,
0,
4,
4,
0,
4,
4,
0,
4,
4,
0,
4,
4,
0,
4,
4,
0,
4,
4,
0,
4,
0,
0,
0,
0,
0... | [
"Import'",
"Import'",
"ImportFrom'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
... |
[
"def FUNC_42():...\n",
"print('PAGE {}'.format(VAR_100))\n",
"VAR_117 = 'string'.format(VAR_100)\n",
"VAR_41 = get(VAR_117)\n",
"VAR_6 = VAR_41.text\n",
"VAR_46 = BeautifulSoup(VAR_6, 'html.parser')\n",
"VAR_118 = 'singles' if VAR_32 else 'doubles'\n",
"VAR_104 = VAR_46.find_all('a')\n",
"for link i... | [
"def iterate():...\n",
"print('PAGE {}'.format(page))\n",
"results_url = (\n 'https://smash.gg/tournaments?per_page=30&filter=%7B%22upcoming%22%3Afalse%2C%22videogameIds%22%3A4%2C%22past%22%3Atrue%7D&page={}'\n .format(page))\n",
"r = get(results_url)\n",
"data = r.text\n",
"soup = BeautifulSoup(dat... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"FunctionDef'",
"For",
"For",
"Return'",
"Return'"
] |
[
"def FUNC_1(VAR_0, VAR_1):...\n",
"VAR_6 = '{0}/{1}'.format(VAR_0.fs_id, VAR_1)\n",
"return VAR_6\n"
] | [
"def csv_upload_path(instance, filename):...\n",
"name = '{0}/{1}'.format(instance.fs_id, filename)\n",
"return name\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self, VAR_12):...\n",
"VAR_14 = (\n \"\"\"DELETE FROM events\n WHERE event_id = {0}\n \"\"\"\n .format(VAR_12))\n",
"VAR_15 = self.cur.execute(VAR_14)\n",
"self.conn.commit()\n",
"return VAR_15\n"
] | [
"def delete_event(self, event_id):...\n",
"sql = (\n \"\"\"DELETE FROM events\n WHERE event_id = {0}\n \"\"\"\n .format(event_id))\n",
"affected_count = self.cur.execute(sql)\n",
"self.conn.commit()\n",
"return affected_count\n"
] | [
0,
4,
4,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Return'"
] |
[
"def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3, *VAR_4, **VAR_5):...\n",
"self.sbjfun = VAR_2\n",
"self.msgfun = VAR_3\n",
"self.forums = VAR_0\n",
"self.targets = type(VAR_1) == str and [('', VAR_1)] or type(VAR_1\n ) == tuple and list(VAR_1) or VAR_1\n",
"super().__init__(*VAR_4, **kvargs)\n"
] | [
"def __init__(self, forums, targets, sbjfun, msgfun, *args, **kvargs):...\n",
"self.sbjfun = sbjfun\n",
"self.msgfun = msgfun\n",
"self.forums = forums\n",
"self.targets = type(targets) == str and [('', targets)] or type(targets\n ) == tuple and list(targets) or targets\n",
"super().__init__(*args, **k... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_29(self):...\n",
"self.compilation_ko('require [\"toto\", \"tata\";')\n"
] | [
"def test_unclosed_string_list(self):...\n",
"self.compilation_ko('require [\"toto\", \"tata\";')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_38):...\n",
"VAR_38 = CLASS_17.run(self, VAR_38)\n",
"if VAR_38 and self.only_whitespace.match(VAR_38):\n",
"VAR_101.errors.add(errors.NO_TITLE)\n",
"return VAR_38\n"
] | [
"def run(self, title):...\n",
"title = VLength.run(self, title)\n",
"if title and self.only_whitespace.match(title):\n",
"c.errors.add(errors.NO_TITLE)\n",
"return title\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Expr'",
"Return'"
] |
[
"def FUNC_6(self):...\n",
"self.assertTrue({'name': 'DocField'} in DatabaseQuery('DocType').execute(\n filters={'name': 'DocField'}))\n"
] | [
"def test_filters_4(self):...\n",
"self.assertTrue({'name': 'DocField'} in DatabaseQuery('DocType').execute(\n filters={'name': 'DocField'}))\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"@then(parsers.parse(...\n",
"VAR_8 = 'string'\n",
"VAR_9 = VAR_0.check_output(VAR_8.format(VAR_1, VAR_2))\n",
"assert len(VAR_9.strip()) > 0, 'No {0} found in namespace {1}'.format(VAR_1,\n VAR_2)\n"
] | [
"@then(parsers.parse(...\n",
"cmd = (\n 'kubectl --kubeconfig=/etc/kubernetes/admin.conf get {0} --namespace {1} -o custom-columns=:metadata.name'\n )\n",
"cmd_res = host.check_output(cmd.format(resource, namespace))\n",
"assert len(cmd_res.strip()) > 0, 'No {0} found in namespace {1}'.format(\n reso... | [
0,
2,
2,
2
] | [
"Condition",
"Assign'",
"Assign'",
"Assert'"
] |
[
"@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_4 = '/api/apps/{app_id}/builds'.format(**locals())\n",
"VAR_7 = {'image': 'autotest/exa... | [
"@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",
"url = '/api/apps/{app_id}/builds'.format(**locals())\n",
"body =... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n",
"from __future__ import unicode_literals\n",
"import json\n",
"import os.path\n",
"from django.test import TestCase\n",
"from django.conf import settings\n",
"from api.models import App\n",
"\"\"\"Te... | [
"\"\"\"\nUnit tests for the Deis api app.\n\nRun the tests with \"./manage.py test api\\\"\n\"\"\"\n",
"from __future__ import unicode_literals\n",
"import json\n",
"import os.path\n",
"from django.test import TestCase\n",
"from django.conf import settings\n",
"from api.models import App\n",
"\"\"\"Te... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
5,
0,
0,
0,
5,
0,
0,
5,
0,
5,
0,
0,
0,
5,
0,
0,
0,
0,
0
] | [
"Expr'",
"ImportFrom'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Expr'",
"Assign'",
"FunctionDef'",
"Expr'",
"Assign'",
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
... |
[
"def FUNC_11(self, VAR_4, VAR_11, VAR_13=False):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_4 is None and self.null:\n",
"return None\n",
"while isinstance(VAR_4, str):\n",
"return json_encode(VAR_4, cls=self.encoder, sort_keys=True)\n",
"VAR_4 = json_decode(VAR_4)\n"
] | [
"def get_db_prep_value(self, value, connection, prepared=False):...\n",
"\"\"\"docstring\"\"\"\n",
"if value is None and self.null:\n",
"return None\n",
"while isinstance(value, str):\n",
"return json_encode(value, cls=self.encoder, sort_keys=True)\n",
"value = json_decode(value)\n"
] | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Condition",
"Return'",
"Assign'"
] |
[
"@click.command(help='Get state')...\n",
"VAR_39 = newrelic.get_state(VAR_0.obj['ACCOUNT'])\n",
"print('# Generated on {}'.format(datetime.utcnow().isoformat()))\n",
"print(yaml.dump(VAR_39, allow_unicode=True, default_flow_style=False,\n Dumper=yamlordereddictloader.SafeDumper))\n"
] | [
"@click.command(help='Get state')...\n",
"state = newrelic.get_state(ctx.obj['ACCOUNT'])\n",
"print('# Generated on {}'.format(datetime.utcnow().isoformat()))\n",
"print(yaml.dump(state, allow_unicode=True, default_flow_style=False, Dumper\n =yamlordereddictloader.SafeDumper))\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Expr'",
"Expr'"
] |
[
"import sys\n",
"if 'lib' not in sys.path:\n",
"sys.path.append('lib')\n",
"import os, signal, logging, threading, re, traceback, time\n",
"import random\n",
"import zmq\n",
"from queue import Queue\n",
"import sup\n",
"import wzworkers as workers\n",
"from dataloader import DataLoader\n",
"from... | [
"import sys\n",
"if 'lib' not in sys.path:\n",
"sys.path.append('lib')\n",
"import os, signal, logging, threading, re, traceback, time\n",
"import random\n",
"import zmq\n",
"from queue import Queue\n",
"import sup\n",
"import wzworkers as workers\n",
"from dataloader import DataLoader\n",
"from... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Condition",
"Expr'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Exp... |
[
"def FUNC_10(self, VAR_13, VAR_14):...\n",
"self.filechooser_creation_dialog = Gtk.FileChooserDialog('Create new Database',\n self, Gtk.FileChooserAction.SAVE, (Gtk.STOCK_CANCEL, Gtk.ResponseType.\n CANCEL, Gtk.STOCK_SAVE, Gtk.ResponseType.OK))\n",
"self.filechooser_creation_dialog.set_current_name('Datab... | [
"def create_filechooser(self, widget, none):...\n",
"self.filechooser_creation_dialog = Gtk.FileChooserDialog('Create new Database',\n self, Gtk.FileChooserAction.SAVE, (Gtk.STOCK_CANCEL, Gtk.ResponseType.\n CANCEL, Gtk.STOCK_SAVE, Gtk.ResponseType.OK))\n",
"self.filechooser_creation_dialog.set_current_na... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_17(self):...\n",
"VAR_7 = Pa11yCrawler('')\n",
"VAR_7.generate_html_reports()\n",
"self._mock_sh.assert_has_calls([call(\n 'pa11ycrawler json-to-html --pa11ycrawler-reports-dir={}'.format(VAR_7.\n pa11y_report_dir))])\n"
] | [
"def test_generate_html_reports(self):...\n",
"suite = Pa11yCrawler('')\n",
"suite.generate_html_reports()\n",
"self._mock_sh.assert_has_calls([call(\n 'pa11ycrawler json-to-html --pa11ycrawler-reports-dir={}'.format(suite.\n pa11y_report_dir))])\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_37(self):...\n",
"for VAR_46 in VAR_11.witch_targets:\n",
"if VAR_46['domain'] == 'beon.ru' and VAR_46['forum'] == 'anonymous':\n",
"FUNC_10(VAR_46['id'], VAR_46['user'])\n"
] | [
"def targets_from_witch(self):...\n",
"for t in d.witch_targets:\n",
"if t['domain'] == 'beon.ru' and t['forum'] == 'anonymous':\n",
"add_target_exc(t['id'], t['user'])\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"For",
"Expr'"
] |
[
"def __init__(self, VAR_1, VAR_5, VAR_4=None):...\n",
"GenericRequest.__init__(self, VAR_1, VAR_4)\n",
"self.url = '%stasks/%s/description' % (self.base_url, VAR_5)\n",
"self.task_id = VAR_5\n"
] | [
"def __init__(self, browser, task_id, base_url=None):...\n",
"GenericRequest.__init__(self, browser, base_url)\n",
"self.url = '%stasks/%s/description' % (self.base_url, task_id)\n",
"self.task_id = task_id\n"
] | [
0,
0,
5,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'"
] |
[
"def FUNC_6(self, VAR_41):...\n",
"if VAR_41:\n",
"return self.error()\n",
"return Thing._by_fullname(VAR_41, False, data=True)\n"
] | [
"def run(self, fullname):...\n",
"if fullname:\n",
"return self.error()\n",
"return Thing._by_fullname(fullname, False, data=True)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"def FUNC_8(self, VAR_8, VAR_10, VAR_9):...\n",
"VAR_0.info('Start creation new repeating event')\n",
"VAR_20 = VAR_8.copy(default={'website_published': True})\n",
"VAR_20.date_end = VAR_9\n",
"VAR_20.date_begin = VAR_10\n",
"VAR_8.fit_repetition_enabled = False\n",
"VAR_8.fit_repetition = ''\n"
] | [
"def _create_new_event(self, old_repeating_event, new_start_date, new_end_date):...\n",
"_logger.info('Start creation new repeating event')\n",
"new_repeating_event = old_repeating_event.copy(default={'website_published':\n True})\n",
"new_repeating_event.date_end = new_end_date\n",
"new_repeating_event.... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def __enter__(self):...\n",
"return self\n"
] | [
"def __enter__(self):...\n",
"return self\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_9(self):...\n",
"self.assertEquals(0, self.course_module.get_late_submission_point_worth())\n",
"self.assertEquals(80, self.course_module_with_late_submissions_allowed.\n get_late_submission_point_worth())\n"
] | [
"def test_course_module_late_submission_point_worth(self):...\n",
"self.assertEquals(0, self.course_module.get_late_submission_point_worth())\n",
"self.assertEquals(80, self.course_module_with_late_submissions_allowed.\n get_late_submission_point_worth())\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(VAR_1, VAR_2, **VAR_3):...\n",
"VAR_5 = VAR_1.get_url_kwargs()\n",
"VAR_5.update({'model': VAR_2})\n",
"VAR_5.update(VAR_3)\n",
"return VAR_5\n"
] | [
"def _normal_kwargs(instance, model_name, **extra_kwargs):...\n",
"kwargs = instance.get_url_kwargs()\n",
"kwargs.update({'model': model_name})\n",
"kwargs.update(extra_kwargs)\n",
"return kwargs\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_8(self, VAR_10):...\n",
"self.model.reset()\n",
"self.load_channels(1, 50)\n"
] | [
"def _on_filter_input_change(self, _):...\n",
"self.model.reset()\n",
"self.load_channels(1, 50)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'"
] |
[
"def FUNC_19(self, VAR_27, VAR_28=200, VAR_29=None):...\n",
"\"\"\"docstring\"\"\"\n",
"self.response.set_status(VAR_28)\n",
"self.response.headers.update(VAR_29 or {})\n",
"self.response.headers['Content-Type'] = self.CONTENT_TYPE_FULL\n",
"self.response.write(json.dumps(VAR_27))\n"
] | [
"def send_response(self, response, http_code=200, headers=None):...\n",
"\"\"\"docstring\"\"\"\n",
"self.response.set_status(http_code)\n",
"self.response.headers.update(headers or {})\n",
"self.response.headers['Content-Type'] = self.CONTENT_TYPE_FULL\n",
"self.response.write(json.dumps(response))\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_27):...\n",
"if VAR_27:\n",
"VAR_27 = int(VAR_27, 36)\n",
"return Comment._byID(VAR_27, True)\n"
] | [
"def run(self, cid):...\n",
"if cid:\n",
"cid = int(cid, 36)\n",
"return Comment._byID(cid, True)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Assign'",
"Return'"
] |
[
"from flask import Flask, request, render_template, redirect, url_for\n",
"import mysql.connector\n",
"VAR_0 = mysql.connector.connect(host='localhost', user='root', password=\n 'navi98%', database='DB_work')\n",
"VAR_1 = VAR_0.cursor()\n",
"VAR_2 = Flask(__name__)\n",
"@VAR_2.route('/')...\n",
"VAR_... | [
"from flask import Flask, request, render_template, redirect, url_for\n",
"import mysql.connector\n",
"db = mysql.connector.connect(host='localhost', user='root', password=\n 'navi98%', database='DB_work')\n",
"cursor = db.cursor()\n",
"app = Flask(__name__)\n",
"@app.route('/')...\n",
"query = 'SELE... | [
0,
0,
4,
0,
0,
0,
4,
4,
4
] | [
"ImportFrom'",
"Import'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Return'"
] |
[
"def FUNC_6(self):...\n",
"VAR_1 = self.client.get('/qa/extractedtext/5', follow=True)\n",
"self.assertIn(b'/datadocument/5', VAR_1.content)\n"
] | [
"def test_dd_link(self):...\n",
"response = self.client.get('/qa/extractedtext/5', follow=True)\n",
"self.assertIn(b'/datadocument/5', response.content)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"@rest_utils.ajax(data_required=True)...\n",
"VAR_9 = VAR_1.DATA['instance_id']\n",
"VAR_6 = VAR_1.DATA['name']\n",
"VAR_10 = api.nova.snapshot_create(VAR_1, VAR_9=instance_id, VAR_6=name)\n",
"return VAR_10\n"
] | [
"@rest_utils.ajax(data_required=True)...\n",
"instance_id = request.DATA['instance_id']\n",
"name = request.DATA['name']\n",
"result = api.nova.snapshot_create(request, instance_id=instance_id, name=name)\n",
"return result\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"@api.multi...\n",
"self._secure_save_data()\n",
"super(CLASS_0, self).forget_me()\n",
"self.write({'church_id': False, 'church_unlinked': False, 'street3': False,\n 'firstname': False, 'deathdate': False, 'geo_point': False,\n 'partner_latitude': False, 'partner_longitude': False})\n",
"self.advocate... | [
"@api.multi...\n",
"self._secure_save_data()\n",
"super(ResPartner, self).forget_me()\n",
"self.write({'church_id': False, 'church_unlinked': False, 'street3': False,\n 'firstname': False, 'deathdate': False, 'geo_point': False,\n 'partner_latitude': False, 'partner_longitude': False})\n",
"self.advoc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_3(self):...\n",
"\"\"\"docstring\"\"\"\n",
"GenericRequest._prepare(self)\n",
"VAR_17 = os.path.join(self.submissions_path, self.task[1])\n",
"VAR_18 = os.listdir(VAR_17)\n",
"VAR_19 = random.choice(VAR_18)\n",
"self.source_path = os.path.join(VAR_17, VAR_19)\n",
"self.files = []\n",
"if o... | [
"def _prepare(self):...\n",
"\"\"\"docstring\"\"\"\n",
"GenericRequest._prepare(self)\n",
"task_path = os.path.join(self.submissions_path, self.task[1])\n",
"sources = os.listdir(task_path)\n",
"source = random.choice(sources)\n",
"self.source_path = os.path.join(task_path, source)\n",
"self.files = [... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_9(self, VAR_10):...\n",
"VAR_32 = Gtk.FileChooserDialog('Choose Keyfile', self.window, Gtk.\n FileChooserAction.OPEN, (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk\n .STOCK_OPEN, Gtk.ResponseType.OK))\n",
"VAR_26 = self.builder.get_object('composite_unlock_select_button')\n",
"VAR_29 = Gtk.F... | [
"def on_composite_unlock_select_button_clicked(self, widget):...\n",
"filechooser_opening_dialog = Gtk.FileChooserDialog('Choose Keyfile', self.\n window, Gtk.FileChooserAction.OPEN, (Gtk.STOCK_CANCEL, Gtk.ResponseType\n .CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.OK))\n",
"composite_unlock_select_button = ... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'"
] |
[
"def FUNC_36(VAR_11):...\n",
"for VAR_51, VAR_58 in VAR_11.items():\n",
"if isinstance(VAR_58, str) or not isinstance(VAR_58, Iterable):\n",
"VAR_58 = [VAR_58]\n",
"yield [(VAR_51, VAR_16) for VAR_16 in VAR_58]\n"
] | [
"def flatten(wildcards):...\n",
"for wildcard, values in wildcards.items():\n",
"if isinstance(values, str) or not isinstance(values, Iterable):\n",
"values = [values]\n",
"yield [(wildcard, value) for value in values]\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Assign'",
"Expr'"
] |
[
"def FUNC_5(self, VAR_8):...\n",
"\"\"\"docstring\"\"\"\n",
"return bool(self.getIDbyPath(VAR_8))\n"
] | [
"def fileExists(self, pth):...\n",
"\"\"\"docstring\"\"\"\n",
"return bool(self.getIDbyPath(pth))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_10(*VAR_11):...\n",
"VAR_12 = ' '.join(str(elem) for elem in VAR_11)\n",
"return VAR_12\n"
] | [
"def fastboot_call(*args):...\n",
"arg_str = ' '.join(str(elem) for elem in args)\n",
"return arg_str\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_9(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if self._state is None:\n",
"self._state = np.zeros(2 ** self.wires, dtype=complex)\n",
"for operation in self._queue:\n",
"self._state[0] = 1\n",
"if operation.name == 'QubitStateVector':\n",
"VAR_1 = CLASS_0._get_operator_matrix(self._observe)\n"... | [
"def execute(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if self._state is None:\n",
"self._state = np.zeros(2 ** self.wires, dtype=complex)\n",
"for operation in self._queue:\n",
"self._state[0] = 1\n",
"if operation.name == 'QubitStateVector':\n",
"A = DefaultQubit._get_operator_matrix(self._observe)\... | [
0,
0,
0,
0,
0,
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'",
"For",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
... |
[
"async def FUNC_1(self, VAR_0):...\n",
"for callback in self.on_member_remove_callbacks:\n",
"await callback(VAR_0)\n"
] | [
"async def on_member_remove(self, member):...\n",
"for callback in self.on_member_remove_callbacks:\n",
"await callback(member)\n"
] | [
0,
0,
0
] | [
"AsyncFunctionDef'",
"For",
"Expr'"
] |
[
"def FUNC_5(self):...\n",
"VAR_0 = Library(id='org/repo', metadata=\n '{\"full_name\": \"NSS Bob\", \"stargazers_count\": 420, \"subscribers_count\": 419, \"forks\": 418, \"updated_at\": \"2011-8-10T13:47:12Z\"}'\n , contributor_count=417)\n",
"VAR_0.tags = json.dumps(['v1.0.0', 'v1.0.1'])\n",
"VAR_0.pu... | [
"def test_ingest_version_falls_back(self):...\n",
"library = Library(id='org/repo', metadata=\n '{\"full_name\": \"NSS Bob\", \"stargazers_count\": 420, \"subscribers_count\": 419, \"forks\": 418, \"updated_at\": \"2011-8-10T13:47:12Z\"}'\n , contributor_count=417)\n",
"library.tags = json.dumps(['v1.0.0'... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def __repr__(self):...\n",
"return '<Options for %s>' % self.resource_name\n"
] | [
"def __repr__(self):...\n",
"return '<Options for %s>' % self.resource_name\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_0(VAR_27, VAR_28):...\n",
"VAR_15.pack_forget()\n",
"VAR_10.forget()\n",
"VAR_36 = Frame(self, bg='#f8f8f8')\n",
"VAR_36.rowconfigure(0, weight=1)\n",
"VAR_36.columnconfigure(0, weight=1)\n",
"VAR_36.rowconfigure(1, weight=3)\n",
"VAR_36.columnconfigure(1, weight=3)\n",
"VAR_36.pack()\n",
... | [
"def add_meal(rowLocation, columnLocation):...\n",
"menu.pack_forget()\n",
"viewRecipeFrame.forget()\n",
"add_meal_frame = Frame(self, bg='#f8f8f8')\n",
"add_meal_frame.rowconfigure(0, weight=1)\n",
"add_meal_frame.columnconfigure(0, weight=1)\n",
"add_meal_frame.rowconfigure(1, weight=3)\n",
"add_mea... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"For",
"For",
"For",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_3(self):...\n",
"self.clear_log_area_action.triggered.connect(self.clear_log_area)\n",
"self.open_idle_action.triggered.connect(self.open_idle)\n",
"self.restart_action.triggered.connect(self.restart)\n",
"self.set_wavelength_action.triggered.connect(self.set_wavelength_dialog)\n",
"self.set_bif... | [
"def setup_action_listeners(self):...\n",
"self.clear_log_area_action.triggered.connect(self.clear_log_area)\n",
"self.open_idle_action.triggered.connect(self.open_idle)\n",
"self.restart_action.triggered.connect(self.restart)\n",
"self.set_wavelength_action.triggered.connect(self.set_wavelength_dialog)\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"async def FUNC_3():...\n",
"VAR_12.channel.send('Command list:\\n' + '\\n' +\n '`help` - Shows this help text\\n' +\n '`whitelist` - Add user(s) to the whitelist')\n"
] | [
"async def help():...\n",
"message.channel.send('Command list:\\n' + '\\n' +\n '`help` - Shows this help text\\n' +\n '`whitelist` - Add user(s) to the whitelist')\n"
] | [
0,
0
] | [
"AsyncFunctionDef'",
"Expr'"
] |
[
"def FUNC_17(self):...\n",
"return '`tab{0}`.name in ({1})'.format(self.doctype, ', '.join([\"'%s'\"] *\n len(self.shared))) % tuple([frappe.db.escape(s, percent=False) for s in\n self.shared])\n"
] | [
"def get_share_condition(self):...\n",
"return '`tab{0}`.name in ({1})'.format(self.doctype, ', '.join([\"'%s'\"] *\n len(self.shared))) % tuple([frappe.db.escape(s, percent=False) for s in\n self.shared])\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"\"\"\"string\"\"\"\n",
"from __future__ import print_function\n",
"import os\n",
"from six import iteritems\n",
"import config as bconfig\n",
"from invenio.legacy.bibclassify import ontology_reader as reader\n",
"import text_extractor as extractor\n",
"import text_normalizer as normalizer\n",
"impo... | [
"\"\"\"\nBibClassify engine.\n\nThis module is the main module of BibClassify. its two main methods are\noutput_keywords_for_sources and get_keywords_from_text. The first one output\nkeywords for a list of sources (local files or URLs, PDF or text) while the\nsecond one outputs the keywords for text lines (which ar... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"Import'",
"ImportFrom'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Condition",
"Docstring",
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Return'",
"Condition",
... |
[
"def FUNC_1(self):...\n",
"VAR_1 = 'cmd'\n",
"self.assertEqual(escape_path_argument('C:\\\\Windows\\\\has-a-weird-shell.txt',\n VAR_1), '\"C:\\\\Windows\\\\has-a-weird-shell.txt\"')\n",
"self.assertEqual(escape_path_argument('C:\\\\Windows\\\\lolrofl\\\\dirs\\\\', VAR_1\n ), '\"C:\\\\Windows\\\\lolrofl\... | [
"def test_escape_path_argument_cmd(self):...\n",
"_type = 'cmd'\n",
"self.assertEqual(escape_path_argument('C:\\\\Windows\\\\has-a-weird-shell.txt',\n _type), '\"C:\\\\Windows\\\\has-a-weird-shell.txt\"')\n",
"self.assertEqual(escape_path_argument('C:\\\\Windows\\\\lolrofl\\\\dirs\\\\', _type\n ), '\"C:... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_33(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_11 = 'TRUNCATE TABLE players;'\n",
"tools.query(VAR_11)\n",
"self.assertEqual(tournament.list_players(), 1)\n"
] | [
"def test_display_zero_matches(self):...\n",
"\"\"\"docstring\"\"\"\n",
"q = 'TRUNCATE TABLE players;'\n",
"tools.query(q)\n",
"self.assertEqual(tournament.list_players(), 1)\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def __init__(self):...\n",
"self.content = VAR_2\n"
] | [
"def __init__(self):...\n",
"self.content = content\n"
] | [
0,
0
] | [
"FunctionDef'",
"Assign'"
] |
[
"def FUNC_11(self, VAR_7=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_18 = set()\n",
"if self.benchmark and (VAR_7 is None or self.benchmark in VAR_7):\n",
"if not self.benchmark.exists:\n",
"for VAR_28, VAR_27 in zip(self.output, self.rule.output):\n",
"VAR_18.add(self.benchmark)\n",
"if VAR_7 is No... | [
"def missing_output(self, requested=None):...\n",
"\"\"\"docstring\"\"\"\n",
"files = set()\n",
"if self.benchmark and (requested is None or self.benchmark in requested):\n",
"if not self.benchmark.exists:\n",
"for f, f_ in zip(self.output, self.rule.output):\n",
"files.add(self.benchmark)\n",
"if req... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Condition",
"For",
"Expr'",
"Condition",
"Return'",
"Condition",
"Condition",
"Condition",
"Expr'",
"Expr'"
] |
[
"@integration_synonym_api...\n",
"FUNC_2(VAR_2)\n",
"FUNC_3(VAR_2, 'RHEN GNAT', VAR_7='1')\n",
"FUNC_5(VAR_4, VAR_5, VAR_11='REN NAT', VAR_10=[{'name': '----REN NAT'}, {\n 'name': 'RHEN GNAT'}, {'name': '----REN'}])\n"
] | [
"@integration_synonym_api...\n",
"clean_database(solr)\n",
"seed_database_with(solr, 'RHEN GNAT', id='1')\n",
"verify_results(client, jwt, query='REN NAT', expected=[{'name':\n '----REN NAT'}, {'name': 'RHEN GNAT'}, {'name': '----REN'}])\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@auth.require(acl.is_bot)...\n",
"VAR_4 = self.parse_body()\n",
"VAR_14 = VAR_4.get('id')\n",
"VAR_17 = VAR_4.get('task_id', '')\n",
"VAR_8 = VAR_4.get('message', 'unknown')\n",
"bot_management.bot_event(VAR_31='task_error', VAR_14=bot_id, external_ip=\n self.request.remote_addr, VAR_24=None, VAR_25=N... | [
"@auth.require(acl.is_bot)...\n",
"request = self.parse_body()\n",
"bot_id = request.get('id')\n",
"task_id = request.get('task_id', '')\n",
"message = request.get('message', 'unknown')\n",
"bot_management.bot_event(event_type='task_error', bot_id=bot_id,\n external_ip=self.request.remote_addr, dimensi... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@pytest.fixture...\n",
"config.load_kube_config(config_file=kubeconfig)\n",
"VAR_4 = client.CoreV1Api()\n",
"VAR_5 = os.path.join(os.path.realpath(os.path.dirname(__file__)), 'files',\n 'busybox.yaml')\n",
"VAR_6 = yaml.safe_load(pod_fd)\n",
"VAR_4.create_namespaced_pod(body=pod_manifest_content, name... | [
"@pytest.fixture...\n",
"config.load_kube_config(config_file=kubeconfig)\n",
"k8s_client = client.CoreV1Api()\n",
"pod_manifest = os.path.join(os.path.realpath(os.path.dirname(__file__)),\n 'files', 'busybox.yaml')\n",
"pod_manifest_content = yaml.safe_load(pod_fd)\n",
"k8s_client.create_namespaced_pod... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"FunctionDef'",
"Assign'",
"Assert'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_22(self, VAR_23, VAR_24):...\n",
"if VAR_23.get_active():\n",
"self.databases_to_save.append(VAR_24)\n",
"self.databases_to_save.remove(VAR_24)\n"
] | [
"def on_save_check_button_toggled(self, check_button, db):...\n",
"if check_button.get_active():\n",
"self.databases_to_save.append(db)\n",
"self.databases_to_save.remove(db)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(VAR_0):...\n",
"return render_form(VAR_0, False, url_for('auth_login'), 'Login', '', True, '')\n"
] | [
"def render_loginForm(form):...\n",
"return render_form(form, False, url_for('auth_login'), 'Login', '', True, '')\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.