lines listlengths 1 444 | raw_lines listlengths 1 444 | label listlengths 1 444 | type listlengths 1 444 |
|---|---|---|---|
[
"def FUNC_12():...\n",
"VAR_20 = []\n",
"for i in range(int(VAR_2)):\n",
"VAR_26 = subprocess.Popen([sys.executable, __file__], stdout=subprocess.\n PIPE, stderr=subprocess.PIPE)\n",
"VAR_20.append(VAR_26.pid)\n",
"log.info('Started worker with pid %s' % VAR_26.pid)\n"
] | [
"def run_children():...\n",
"child_pids = []\n",
"for i in range(int(no_subprocess)):\n",
"proc = subprocess.Popen([sys.executable, __file__], stdout=subprocess.PIPE,\n stderr=subprocess.PIPE)\n",
"child_pids.append(proc.pid)\n",
"log.info('Started worker with pid %s' % proc.pid)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Assign'",
"Expr'",
"Expr'"
] |
[
"@VAR_0.route('/tutorial')...\n",
"return ''\n"
] | [
"@app.route('/tutorial')...\n",
"return ''\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_26(self, VAR_37):...\n",
"while self.running.is_set():\n",
"self.log.exception('Exception \"%s\" raised on create_spawn', e)\n",
"VAR_58 = VAR_37.pop()\n",
"return\n",
"self.proxylist.add(VAR_58)\n",
"for spawn in FUNC_7(VAR_58[0], VAR_58[1], self.pc, self.get_userqueue):\n",
"self.log.info(... | [
"def add_spawns(self, proxypairs):...\n",
"while self.running.is_set():\n",
"self.log.exception('Exception \"%s\" raised on create_spawn', e)\n",
"proxypair = proxypairs.pop()\n",
"return\n",
"self.proxylist.add(proxypair)\n",
"for spawn in create_spawn(proxypair[0], proxypair[1], self.pc, self.\n",
"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Expr'",
"Assign'",
"Return'",
"Expr'",
"For",
"Expr'",
"Expr'"
] |
[
"def __init__(self, VAR_7, *VAR_15, **VAR_16):...\n",
"CLASS_0.__init__(self, VAR_7, *VAR_15, **kw)\n"
] | [
"def __init__(self, param, *a, **kw):...\n",
"Validator.__init__(self, param, *a, **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_24(self, VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"return VAR_21 in self.sos_info['presets']\n"
] | [
"def _preset_exists(self, preset):...\n",
"\"\"\"docstring\"\"\"\n",
"return preset in self.sos_info['presets']\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def FUNC_7(self):...\n",
"VAR_17 = shellutil.run_get_output('/sbin/pidof dhclient')\n",
"return VAR_17[1] if VAR_17[0] == 0 else None\n"
] | [
"def get_dhcp_pid(self):...\n",
"ret = shellutil.run_get_output('/sbin/pidof dhclient')\n",
"return ret[1] if ret[0] == 0 else None\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_39(VAR_62):...\n",
"return json.loads(VAR_62) if VAR_21 else VAR_62\n"
] | [
"def get_str(_str):...\n",
"return json.loads(_str) if as_json else _str\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(VAR_6, VAR_3, VAR_4, VAR_5=None):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_5 is None:\n",
"VAR_5 = ray.DriverID.nil()\n",
"VAR_35 = ray.gcs_utils.construct_error_message(VAR_5, VAR_3, VAR_4, time.time()\n )\n",
"VAR_6.execute_command('RAY.TABLE_APPEND', ray.gcs_utils.TablePrefix.\n ERRO... | [
"def push_error_to_driver_through_redis(redis_client, error_type, message,...\n",
"\"\"\"docstring\"\"\"\n",
"if driver_id is None:\n",
"driver_id = ray.DriverID.nil()\n",
"error_data = ray.gcs_utils.construct_error_message(driver_id, error_type,\n message, time.time())\n",
"redis_client.execute_comman... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_1():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = 'testing inband sql injection on parameter '\n",
"VAR_3 += \"'%s'\" % kb.injParameter\n",
"logger.info(VAR_3)\n",
"VAR_4 = ''\n",
"VAR_0 = agent.prefixQuery(' UNION ALL SELECT NULL')\n",
"for VAR_1 in (queries[kb.dbms].comment, ''):\n",
"VAR_... | [
"def unionTest():...\n",
"\"\"\"docstring\"\"\"\n",
"logMsg = 'testing inband sql injection on parameter '\n",
"logMsg += \"'%s'\" % kb.injParameter\n",
"logger.info(logMsg)\n",
"value = ''\n",
"query = agent.prefixQuery(' UNION ALL SELECT NULL')\n",
"for comment in (queries[kb.dbms].comment, ''):\n",... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"AugAssign'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Expr'",
"AugAssign'",
"AugAssign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_2(self, VAR_1):...\n",
"VAR_2 = self.connect()\n",
"VAR_3 = \"INSERT INTO crimes (description) VALUES ('{}');\".format(VAR_1)\n",
"VAR_2.close()\n",
"cursor.execute(VAR_3)\n",
"VAR_2.commit()\n"
] | [
"def add_input(self, data):...\n",
"connection = self.connect()\n",
"query = \"INSERT INTO crimes (description) VALUES ('{}');\".format(data)\n",
"connection.close()\n",
"cursor.execute(query)\n",
"connection.commit()\n"
] | [
0,
0,
4,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"\"\"\"API over the nova service.\n\"\"\"\n",
"from collections import OrderedDict\n",
"from django.http import HttpResponse\n",
"from django.template.defaultfilters import slugify\n",
"from django.utils import http as utils_http\n",
"from django.utils.translation import ugettext_lazy as _\n",
"from dja... | [
"\"\"\"API over the nova service.\n\"\"\"\n",
"from collections import OrderedDict\n",
"from django.http import HttpResponse\n",
"from django.template.defaultfilters import slugify\n",
"from django.utils import http as utils_http\n",
"from django.utils.translation import ugettext_lazy as _\n",
"from dja... | [
5,
0,
5,
5,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Expr'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Expr'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Retur... |
[
"def FUNC_4(VAR_6):...\n",
"VAR_8 = VAR_6.submission.exercise if VAR_6.submission else None\n",
"return {'id': VAR_6.id, 'submission_id': VAR_6.submission.id if VAR_6.\n submission else 0, 'name': '{} {}, {}'.format(VAR_6.course_instance.\n course.code, str(VAR_8.parent) if VAR_8 and VAR_8.parent else VAR... | [
"def notification_entry(n):...\n",
"exercise = n.submission.exercise if n.submission else None\n",
"return {'id': n.id, 'submission_id': n.submission.id if n.submission else 0,\n 'name': '{} {}, {}'.format(n.course_instance.course.code, str(exercise.\n parent) if exercise and exercise.parent else n.course... | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Return'"
] |
[
"def FUNC_7(self, VAR_11):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
"def create_snapshot(self, snapshot):...\n",
"\"\"\"docstring\"\"\"\n"
] | [
0,
0
] | [
"FunctionDef'",
"Docstring"
] |
[
"def FUNC_24(self, VAR_2, VAR_3, VAR_4, *VAR_6):...\n",
"VAR_47 = self.browse(VAR_2, VAR_3, VAR_4)\n",
"for t in VAR_47:\n",
"self.write(VAR_2, VAR_3, [t.id], {'state': 'open'})\n",
"return True\n"
] | [
"def do_open(self, cr, uid, ids, *args):...\n",
"tasks = self.browse(cr, uid, ids)\n",
"for t in tasks:\n",
"self.write(cr, uid, [t.id], {'state': 'open'})\n",
"return True\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"For",
"Expr'",
"Return'"
] |
[
"def FUNC_17(self):...\n",
"\"\"\"docstring\"\"\"\n",
"db.session.delete(self)\n",
"db.session.commit()\n"
] | [
"def delete(self):...\n",
"\"\"\"docstring\"\"\"\n",
"db.session.delete(self)\n",
"db.session.commit()\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'"
] |
[
"def __init__(self, VAR_7, VAR_20=True, *VAR_15, **VAR_16):...\n",
"CLASS_5.__init__(self, VAR_7, *VAR_15, VAR_20=redirect, **kw)\n"
] | [
"def __init__(self, param, redirect=True, *a, **kw):...\n",
"VLink.__init__(self, param, *a, redirect=redirect, **kw)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_6(self, VAR_14):...\n",
"self.icinga_lines.append(VAR_14)\n"
] | [
"def write_line(self, line):...\n",
"self.icinga_lines.append(line)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_9():...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_35 = FUNC_8('tasks')\n",
"VAR_36 = re.findall('string', VAR_35.text, re.X)\n",
"VAR_37 = {}\n",
"for VAR_46 in VAR_36:\n",
"VAR_57, VAR_58, VAR_59 = VAR_46\n",
"return VAR_37\n",
"VAR_57 = int(VAR_57)\n",
"VAR_37[VAR_58] = {'title': VAR_59, 'id... | [
"def get_tasks():...\n",
"\"\"\"docstring\"\"\"\n",
"r = admin_req('tasks')\n",
"groups = re.findall(\n \"\"\"\n <tr>\\\\s*\n <td><a\\\\s+href=\"./task/(\\\\d+)\">(.*)</a></td>\\\\s*\n <td>(.*)</td>\\\\s*\n \"\"\"\n , r.text, re.X)\n",
"tasks = {}\n",
"for g in groups:\n"... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"For",
"Assign'",
"Return'",
"Assign'",
"Assign'"
] |
[
"def __init__(self, VAR_1, VAR_11):...\n",
"self.name = VAR_1\n",
"self.shots = VAR_11\n",
"self._out = None\n",
"self._queue = []\n",
"self._observe = None\n"
] | [
"def __init__(self, name, shots):...\n",
"self.name = name\n",
"self.shots = shots\n",
"self._out = None\n",
"self._queue = []\n",
"self._observe = None\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def FUNC_5(self):...\n",
""
] | [
"def test_run_interactive_shell_command_kwargs_delegation(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_23(self):...\n",
"VAR_22 = model.Identity.from_bytes('user:peer@a.com')\n",
"@classmethod...\n",
"return [lambda _request: VAR_22]\n"
] | [
"def test_delegation_token(self):...\n",
"peer_ident = model.Identity.from_bytes('user:peer@a.com')\n",
"@classmethod...\n",
"return [lambda _request: peer_ident]\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Return'"
] |
[
"@property...\n",
"return self._result_getter()\n"
] | [
"@property...\n",
"return self._result_getter()\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_16(self, VAR_9=True):...\n",
"\"\"\"docstring\"\"\"\n",
"self._kill_process_type(VAR_13.PROCESS_TYPE_REDIS_SERVER, VAR_9=check_alive)\n"
] | [
"def kill_redis(self, check_alive=True):...\n",
"\"\"\"docstring\"\"\"\n",
"self._kill_process_type(ray_constants.PROCESS_TYPE_REDIS_SERVER,\n check_alive=check_alive)\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_12(self, VAR_10=None):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_30 = vars(self.parse_known_args(VAR_15=True)[0])\n",
"VAR_13 = VAR_30.get('image_mode', None)\n",
"if VAR_13 is not None and VAR_13 != 'none':\n",
"self.add_image_args(VAR_13)\n",
"VAR_12 = VAR_30.get('task', None)\n",
"if VAR_12 ... | [
"def add_extra_args(self, args=None):...\n",
"\"\"\"docstring\"\"\"\n",
"parsed = vars(self.parse_known_args(nohelp=True)[0])\n",
"image_mode = parsed.get('image_mode', None)\n",
"if image_mode is not None and image_mode != 'none':\n",
"self.add_image_args(image_mode)\n",
"task = parsed.get('task', None... | [
0,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Assign'",
"Condition",
"Expr'",
"Expr'"
] |
[
"def FUNC_2(VAR_7):...\n",
"return urlparse.urljoin(CLASS_0.server_location, VAR_7)\n"
] | [
"def _BuildUri(handler):...\n",
"return urlparse.urljoin(BaseRequest.server_location, handler)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def __init__(self, VAR_0):...\n",
"self.MAX_P_CHECKS = 5\n",
"self.MAX_CRAWLS = 1\n",
"self.MAX_PATH_LENGTH = 50\n",
"self.TARGET = 'Philosophy'\n",
"self.DOMAIN = 'https://en.wikipedia.org'\n",
"self.start_wiki = 'Special:Random' if not VAR_0 else VAR_0\n",
"self.path_lengths = []\n",
"self.wiki_t... | [
"def __init__(self, wiki):...\n",
"self.MAX_P_CHECKS = 5\n",
"self.MAX_CRAWLS = 1\n",
"self.MAX_PATH_LENGTH = 50\n",
"self.TARGET = 'Philosophy'\n",
"self.DOMAIN = 'https://en.wikipedia.org'\n",
"self.start_wiki = 'Special:Random' if not wiki else wiki\n",
"self.path_lengths = []\n",
"self.wiki_to_t... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def __next__(self):...\n",
"if self._resource_iters:\n",
"if self._field_iters:\n",
"if self._field_iters[-1]:\n",
"if self.current_resource:\n",
"VAR_7 = self._field_iters[-1][0]\n",
"self._field_iters.pop()\n",
"if hasattr(self, 'on_exit'):\n",
"VAR_13, VAR_15 = VAR_6(self._resource_iters[-1])\n"... | [
"def __next__(self):...\n",
"if self._resource_iters:\n",
"if self._field_iters:\n",
"if self._field_iters[-1]:\n",
"if self.current_resource:\n",
"field = self._field_iters[-1][0]\n",
"self._field_iters.pop()\n",
"if hasattr(self, 'on_exit'):\n",
"key, next_resource = next(self._resource_iters[-1])... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"Condition",
"Condition",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Condition",
"Expr'",
"Expr... |
[
"def FUNC_5(self):...\n",
"if hasattr(self, 'extractedhhdoc'):\n",
"return self.extractedhhdoc\n",
"return self\n"
] | [
"def pull_out_hh(self):...\n",
"if hasattr(self, 'extractedhhdoc'):\n",
"return self.extractedhhdoc\n",
"return self\n"
] | [
0,
6,
6,
0
] | [
"FunctionDef'",
"Condition",
"Return'",
"Return'"
] |
[
"import re, requests, argparse, logging, os, coloredlogs, datetime, getpass, tempfile, itertools, json, concurrent.futures, random\n",
"from utils import *\n",
"from UploadForm import UploadForm\n",
"from threading import Lock\n",
"VAR_0 = '0.5.0'\n",
"logging.basicConfig(datefmt='[%m/%d/%Y-%H:%M:%S]')\n"... | [
"import re, requests, argparse, logging, os, coloredlogs, datetime, getpass, tempfile, itertools, json, concurrent.futures, random\n",
"from utils import *\n",
"from UploadForm import UploadForm\n",
"from threading import Lock\n",
"version = '0.5.0'\n",
"logging.basicConfig(datefmt='[%m/%d/%Y-%H:%M:%S]')\... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Expr'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"AugAssign'",
"For",
"AugAssign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
... |
[
"def FUNC_32(VAR_19):...\n",
"return dict((expr, vimsupport.VimExpressionToPythonType(expr)) for expr in\n VAR_19)\n"
] | [
"def BuildExtraConfData(extra_conf_vim_data):...\n",
"return dict((expr, vimsupport.VimExpressionToPythonType(expr)) for expr in\n extra_conf_vim_data)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_1(VAR_0, VAR_1=False):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_34 = VAR_0.split('\\n')\n",
"if VAR_1:\n",
"VAR_34 = VAR_34[0:1] + VAR_34[3:]\n",
"return '\\n'.join(VAR_34)\n"
] | [
"def format_error_message(exception_message, task_exception=False):...\n",
"\"\"\"docstring\"\"\"\n",
"lines = exception_message.split('\\n')\n",
"if task_exception:\n",
"lines = lines[0:1] + lines[3:]\n",
"return '\\n'.join(lines)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_46=50, VAR_47=100):...\n",
"\"\"\"docstring\"\"\"\n",
"self.regex = re.compile(\n '((?P<value>.+)(?P=value){{{min_repeat},{max_repeat}}})$'.format(VAR_46\n =min_repeat - 1, VAR_47=max_repeat - 1))\n"
] | [
"def __init__(self, min_repeat=50, max_repeat=100):...\n",
"\"\"\"docstring\"\"\"\n",
"self.regex = re.compile(\n '((?P<value>.+)(?P=value){{{min_repeat},{max_repeat}}})$'.format(\n min_repeat=min_repeat - 1, max_repeat=max_repeat - 1))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'"
] |
[
"@VAR_0.route('/users/<id>')...\n",
"VAR_2 = connectToMySQL('users_db')\n",
"VAR_4 = VAR_2.query_db('SELECT * FROM users WHERE id = {};'.format(VAR_1))\n",
"return render_template('user.html', VAR_4=user[0])\n"
] | [
"@app.route('/users/<id>')...\n",
"mysql = connectToMySQL('users_db')\n",
"user = mysql.query_db('SELECT * FROM users WHERE id = {};'.format(id))\n",
"return render_template('user.html', user=user[0])\n"
] | [
0,
0,
4,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Return'"
] |
[
"def __init__(self, VAR_7):...\n",
"self._user_options = VAR_7\n",
"self._user_notified_about_crash = False\n",
"self._diag_interface = DiagnosticInterface(VAR_7)\n",
"self._omnicomp = OmniCompleter(VAR_7)\n",
"self._latest_completion_request = None\n",
"self._latest_file_parse_request = None\n",
"sel... | [
"def __init__(self, user_options):...\n",
"self._user_options = user_options\n",
"self._user_notified_about_crash = False\n",
"self._diag_interface = DiagnosticInterface(user_options)\n",
"self._omnicomp = OmniCompleter(user_options)\n",
"self._latest_completion_request = None\n",
"self._latest_file_par... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
7,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"import os\n",
"import sys\n",
"import zlib\n",
"import time\n",
"import logging as logger\n",
"import urlparse\n",
"from datetime import datetime, timedelta\n",
"import cPickle as pickle\n",
"logger.info('cPickle module not available')\n",
"sys.setrecursionlimit(10000)\n",
"import pickle\n",
... | [
"import os\n",
"import sys\n",
"import zlib\n",
"import time\n",
"import logging as logger\n",
"import urlparse\n",
"from datetime import datetime, timedelta\n",
"import cPickle as pickle\n",
"logger.info('cPickle module not available')\n",
"sys.setrecursionlimit(10000)\n",
"import pickle\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"Import'",
"Expr'",
"Expr'",
"Import'",
"Expr'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"FunctionDef'",
... |
[
"def FUNC_22(VAR_21):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_45 = FUNC_21(VAR_21)\n",
"if not isinstance(VAR_45, dict):\n",
"return VAR_45\n"
] | [
"def load_configfile(configpath):...\n",
"\"\"\"docstring\"\"\"\n",
"config = _load_configfile(configpath)\n",
"if not isinstance(config, dict):\n",
"return config\n"
] | [
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'"
] |
[
"def FUNC_23(self, VAR_16):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_35 = self.common._cli_run('showvlun -a -showcols Port', None)\n",
"VAR_36 = {}\n",
"for VAR_15 in VAR_16:\n",
"VAR_36[VAR_15] = 0\n",
"VAR_37 = None\n",
"if VAR_35:\n",
"VAR_35 = VAR_35[1:]\n",
"return VAR_37\n",
"for line in VAR... | [
"def _get_least_used_nsp(self, nspss):...\n",
"\"\"\"docstring\"\"\"\n",
"result = self.common._cli_run('showvlun -a -showcols Port', None)\n",
"nsp_counts = {}\n",
"for nsp in nspss:\n",
"nsp_counts[nsp] = 0\n",
"current_least_used_nsp = None\n",
"if result:\n",
"result = result[1:]\n",
"return c... | [
0,
0,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Return'",
"For",
"Assign'",
"Assign'",
"Condition",
"For",
"Assign'",
"Condition",
"Assign'",
"Assign'"
] |
[
"def FUNC_4(VAR_12, VAR_16, VAR_17, VAR_18, VAR_19):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_16 = VAR_16.copy()\n",
"if VAR_17 is not None:\n",
"VAR_16['exit_code'] = VAR_17\n",
"if VAR_18:\n",
"VAR_16['output'] = base64.b64encode(VAR_18)\n",
"VAR_35 = VAR_12.url_read_json('/swarming/api/v1/bot/task_up... | [
"def post_update(swarming_server, params, exit_code, stdout, output_chunk_start...\n",
"\"\"\"docstring\"\"\"\n",
"params = params.copy()\n",
"if exit_code is not None:\n",
"params['exit_code'] = exit_code\n",
"if stdout:\n",
"params['output'] = base64.b64encode(stdout)\n",
"resp = swarming_server.url... | [
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Condition"
] |
[
"def FUNC_4(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.cursor.execute('create table t1(n int)')\n",
"self.cursor.execute('insert into t1 values (?)', 1)\n",
"self.cursor.execute('insert into t1 values (?)', 2)\n",
"self.cursor.execute('insert into t1 values (?)', 3)\n",
"for i in range(3):\n",
"se... | [
"def test_multiple_bindings(self):...\n",
"\"\"\"docstring\"\"\"\n",
"self.cursor.execute('create table t1(n int)')\n",
"self.cursor.execute('insert into t1 values (?)', 1)\n",
"self.cursor.execute('insert into t1 values (?)', 2)\n",
"self.cursor.execute('insert into t1 values (?)', 3)\n",
"for i in ran... | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"For",
"Expr'",
"Expr'"
] |
[
"def FUNC_6(self):...\n",
"self.mock(bot_main, 'get_remote', lambda : self.server)\n",
"VAR_9 = []\n",
"def FUNC_21(VAR_10):...\n",
"VAR_9.append(1)\n",
"return False\n"
] | [
"def test_setup_bot(self):...\n",
"self.mock(bot_main, 'get_remote', lambda : self.server)\n",
"setup_bots = []\n",
"def setup_bot(_bot):...\n",
"setup_bots.append(1)\n",
"return False\n"
] | [
0,
5,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"FunctionDef'",
"Expr'",
"Return'"
] |
[
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"log.info(\n 'Evaluating last active users with date of last time when they used bot...'\n )\n",
"VAR_10 = f'string{VAR_6}'\n",
"VAR_19 = db.execute_query(VAR_10)\n",
"log.error(\n 'Cannot get the last active users because of some problems with the... | [
"@staticmethod...\n",
"\"\"\"docstring\"\"\"\n",
"log.info(\n 'Evaluating last active users with date of last time when they used bot...'\n )\n",
"query = (\n f'SELECT p.chat_id, u.first_name, u.nickname, u.last_name, u.language FROM photo_queries_table2 p INNER JOIN users u ON p.chat_id = u.chat_id ... | [
0,
0,
0,
4,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Return'"
] |
[
"def FUNC_20(self):...\n",
"VAR_3 = self.current_email()\n",
"if not self.passes_email_suffix(VAR_3):\n",
"VAR_40 = 'User {!r} does not have email suffix {!r}'.format(VAR_3, self.\n allowed_email_suffix)\n",
"if not self.passes_email_whitelist(VAR_3):\n",
"VAR_40 = 'User not in whitelist: {!r}'.format(... | [
"def check_authorization(self):...\n",
"email = self.current_email()\n",
"if not self.passes_email_suffix(email):\n",
"msg = 'User {!r} does not have email suffix {!r}'.format(email, self.\n allowed_email_suffix)\n",
"if not self.passes_email_whitelist(email):\n",
"msg = 'User not in whitelist: {!r}'.f... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'"
] |
[
"def FUNC_13(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_2 = {'SEVERITY': {'MEDIUM': 3}, 'CONFIDENCE': {'MEDIUM': 3}}\n",
"self.check_example('hardcoded-tmp.py', VAR_2)\n"
] | [
"def test_hardcoded_tmp(self):...\n",
"\"\"\"docstring\"\"\"\n",
"expect = {'SEVERITY': {'MEDIUM': 3}, 'CONFIDENCE': {'MEDIUM': 3}}\n",
"self.check_example('hardcoded-tmp.py', expect)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Expr'"
] |
[
"def FUNC_3(self, VAR_5):...\n",
"self.common = self._init_common()\n",
"self._check_flags()\n",
"self.common.do_setup(VAR_5)\n"
] | [
"def do_setup(self, context):...\n",
"self.common = self._init_common()\n",
"self._check_flags()\n",
"self.common.do_setup(context)\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_5(VAR_13, VAR_11, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_37 = VAR_10.setdefault('alias_cache', [])\n",
"if VAR_13 == VAR_11:\n",
"return VAR_13\n",
"if VAR_11 in VAR_37:\n",
"return VAR_11\n",
"VAR_37.append(VAR_11)\n",
"return u'({} AS {})'.format(VAR_13, VAR_11)\n"
] | [
"def alias_expr(expr, alias, body):...\n",
"\"\"\"docstring\"\"\"\n",
"alias_cache = body.setdefault('alias_cache', [])\n",
"if expr == alias:\n",
"return expr\n",
"if alias in alias_cache:\n",
"return alias\n",
"alias_cache.append(alias)\n",
"return u'({} AS {})'.format(expr, alias)\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Condition",
"Return'",
"Condition",
"Return'",
"Expr'",
"Return'"
] |
[
"@VAR_0.route('/signup/<remote_app>/', methods=['GET', 'POST'])...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_1 not in signup_handlers:\n",
"return abort(404)\n",
"VAR_3 = signup_handlers[VAR_1]['view']()\n",
"return abort(404) if VAR_3 is None else VAR_3\n"
] | [
"@blueprint.route('/signup/<remote_app>/', methods=['GET', 'POST'])...\n",
"\"\"\"docstring\"\"\"\n",
"if remote_app not in signup_handlers:\n",
"return abort(404)\n",
"res = signup_handlers[remote_app]['view']()\n",
"return abort(404) if res is None else res\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"Condition",
"Docstring",
"Condition",
"Return'",
"Assign'",
"Return'"
] |
[
"@VAR_2.route('/templates/<path:path>')...\n",
"return send_from_directory('templates', VAR_6)\n"
] | [
"@endpoints.route('/templates/<path:path>')...\n",
"return send_from_directory('templates', path)\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"@VAR_1.route('/facnonfac', methods=['GET', 'POST'])...\n",
"VAR_9 = FUNC_14(1)\n",
"VAR_10 = [[VAR_3[0], VAR_3[1], VAR_3[2]] for VAR_3 in VAR_9]\n",
"return render_template('demo2.html', VAR_8=query1, rows=results)\n"
] | [
"@app.route('/facnonfac', methods=['GET', 'POST'])...\n",
"z = demo(1)\n",
"results = [[x[0], x[1], x[2]] for x in z]\n",
"return render_template('demo2.html', query=query1, rows=results)\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Assign'",
"Assign'",
"Return'"
] |
[
"@property...\n",
"if self._resource_stack:\n",
"return self._resource_stack[-1]\n"
] | [
"@property...\n",
"if self._resource_stack:\n",
"return self._resource_stack[-1]\n"
] | [
0,
0,
0
] | [
"Condition",
"Condition",
"Return'"
] |
[
"def FUNC_14(self, VAR_32, VAR_33, VAR_30):...\n",
"\"\"\"docstring\"\"\"\n",
"if VAR_33 & os.O_WRONLY == os.O_WRONLY or VAR_33 & os.O_RDWR == os.O_RDWR:\n",
"VAR_68 = VAR_30 & ~111\n",
"if VAR_33 & os.O_RDONLY == os.O_RDONLY:\n",
"VAR_69 = '%s/%s_sftp_%s' % (self.cfg.get('honeypot', 'download_path'), tim... | [
"def open(self, filename, openFlags, mode):...\n",
"\"\"\"docstring\"\"\"\n",
"if openFlags & os.O_WRONLY == os.O_WRONLY or openFlags & os.O_RDWR == os.O_RDWR:\n",
"hostmode = mode & ~111\n",
"if openFlags & os.O_RDONLY == os.O_RDONLY:\n",
"hostfile = '%s/%s_sftp_%s' % (self.cfg.get('honeypot', 'download_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Return'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_5(VAR_1, *VAR_2, **VAR_3):...\n",
"def FUNC_6():...\n",
"if not request.method in VAR_0:\n",
"return True\n",
"if not request.environ.get('AUTH_TYPE') == 'cookie':\n",
"return True\n",
"if config.get('skip_authentication'):\n",
"return True\n",
"if request.environ.get('HTTP_REFERER'):\n",
... | [
"def _decorate(f, *a, **kw):...\n",
"def check():...\n",
"if not request.method in methods:\n",
"return True\n",
"if not request.environ.get('AUTH_TYPE') == 'cookie':\n",
"return True\n",
"if config.get('skip_authentication'):\n",
"return True\n",
"if request.environ.get('HTTP_REFERER'):\n",
"ref_... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5,
0,
0,
0,
0,
0,
0,
5,
0
] | [
"FunctionDef'",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"Assign'",
"Return'",
"Return'",
"Condition",
"AugAssign'",
"Condition",
"Condition",
"Return'"
] |
[
"@property...\n",
"return self._subworkflows.values()\n"
] | [
"@property...\n",
"return self._subworkflows.values()\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"@classmethod...\n",
"return [FUNC_27, FUNC_28]\n"
] | [
"@classmethod...\n",
"return [not_applicable, applicable]\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_5(VAR_0, VAR_7):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6.append(CLASS_1(VAR_0, VAR_7))\n"
] | [
"def add_menu(name, href):...\n",
"\"\"\"docstring\"\"\"\n",
"_MENU_ITEMS.append(_MenuItem(name, href))\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Expr'"
] |
[
"def FUNC_8(self):...\n",
"self.mock(time, 'time', lambda : 126.0)\n",
"def FUNC_22(VAR_14, VAR_15):...\n",
"VAR_37 = VAR_14.state['sleep_streak']\n",
"self.assertEqual(VAR_14.remote, self.server)\n",
"if VAR_37 == 5:\n",
"return False\n"
] | [
"def test_run_bot(self):...\n",
"self.mock(time, 'time', lambda : 126.0)\n",
"def poll_server(botobj, _):...\n",
"sleep_streak = botobj.state['sleep_streak']\n",
"self.assertEqual(botobj.remote, self.server)\n",
"if sleep_streak == 5:\n",
"return False\n"
] | [
0,
0,
0,
0,
5,
0,
0
] | [
"FunctionDef'",
"Expr'",
"FunctionDef'",
"Assign'",
"Expr'",
"Condition",
"Return'"
] |
[
"def FUNC_24(VAR_40):...\n",
"for VAR_18 in VAR_40.sub_items:\n",
"if VAR_18.parent:\n",
"return\n",
"VAR_18.parent = VAR_40\n",
"FUNC_24(VAR_18)\n"
] | [
"def iterate_fsnode(node):...\n",
"for item in node.sub_items:\n",
"if item.parent:\n",
"return\n",
"item.parent = node\n",
"iterate_fsnode(item)\n"
] | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"Condition",
"Return'",
"Assign'",
"Expr'"
] |
[
"def FUNC_16(self):...\n",
"VAR_25 = c.get('/')\n",
"self.assertEqual(VAR_25.status_code, 302)\n",
"self.assertTrue(VAR_25.location.startswith(self.app.config[\n 'TOKEN_SERVICE_URL']))\n"
] | [
"def test_no_cookie(self):...\n",
"resp = c.get('/')\n",
"self.assertEqual(resp.status_code, 302)\n",
"self.assertTrue(resp.location.startswith(self.app.config['TOKEN_SERVICE_URL']))\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Expr'"
] |
[
"def FUNC_1(VAR_6, VAR_2, VAR_3):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_9 = [f\"{'VULNERABLE_STRING'!r}\"]\n",
"VAR_6 = VAR_4.get(VAR_0, VAR_1=sqli)\n",
"VAR_10 = 1\n",
"VAR_11 = VAR_2.index('NULL')\n",
"while not VAR_6.ok:\n",
"VAR_7 = VAR_2.index('NULL', VAR_11)\n",
"print(f'Column {VAR_10} conta... | [
"def sqli_union_lab_2(lab2, null, sqli):...\n",
"\"\"\"docstring\"\"\"\n",
"secret_value = [f\"{'VULNERABLE_STRING'!r}\"]\n",
"lab2 = api_session.get(url, params=sqli)\n",
"column = 1\n",
"step = null.index('NULL')\n",
"while not lab2.ok:\n",
"index = null.index('NULL', step)\n",
"print(f'Column {co... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"AugAssign'"
] |
[
"@VAR_0.route('/messages')...\n",
"if request.method == 'GET':\n",
"return db_getMessage(VAR_1)\n"
] | [
"@messages_module.route('/messages')...\n",
"if request.method == 'GET':\n",
"return db_getMessage(dialog_id)\n"
] | [
0,
0,
0
] | [
"Condition",
"Condition",
"Return'"
] |
[
"from osv import osv\n",
"from tools.translate import _\n",
"VAR_0 = 'pos.close.statement'\n",
"VAR_1 = 'Close Statements'\n",
"def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3).company_id.id\n",
"VAR_7 = []\... | [
"from osv import osv\n",
"from tools.translate import _\n",
"_name = 'pos.close.statement'\n",
"_description = 'Close Statements'\n",
"def close_statement(self, cr, uid, ids, context):...\n",
"\"\"\"docstring\"\"\"\n",
"company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id\n",
"li... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"ImportFrom'",
"ImportFrom'",
"Assign'",
"Assign'",
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Assign'",
"Condition",
"Conditi... |
[
"def FUNC_6(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.issue_gcs_flushes:\n",
"return\n",
"if self.gcs_flush_policy is None:\n",
"VAR_45 = self.redis.get('gcs_flushing_policy')\n",
"if not self.gcs_flush_policy.should_flush(self.redis_shard):\n",
"if VAR_45 is None:\n",
"return\n",
"VAR... | [
"def _maybe_flush_gcs(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.issue_gcs_flushes:\n",
"return\n",
"if self.gcs_flush_policy is None:\n",
"serialized = self.redis.get('gcs_flushing_policy')\n",
"if not self.gcs_flush_policy.should_flush(self.redis_shard):\n",
"if serialized is None:\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'",
"Condition",
"Assign'",
"Condition",
"Condition",
"Return'",
"Assign'",
"Return'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_30(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if 'saml_data' in VAR_15:\n",
"return VAR_15['saml_data']['nameid']\n"
] | [
"def _current_user_nameid(self):...\n",
"\"\"\"docstring\"\"\"\n",
"if 'saml_data' in session:\n",
"return session['saml_data']['nameid']\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Return'"
] |
[
"@VAR_4...\n",
"self.print_prompt()\n"
] | [
"@deferred...\n",
"self.print_prompt()\n"
] | [
0,
0
] | [
"Condition",
"Expr'"
] |
[
"@VAR_2.route('/delete_comment/<pic_name>', methods=['POST', 'GET'])...\n",
"if request.method == 'POST':\n",
"VAR_4 = (\"DELETE FROM commentsTable\\t\\t\\t\\tWHERE comment_id = '%s'\" %\n request.form['delete_comment'])\n",
"VAR_1.execute(VAR_4)\n",
"VAR_0.commit()\n",
"return redirect(url_for('view_c... | [
"@app.route('/delete_comment/<pic_name>', methods=['POST', 'GET'])...\n",
"if request.method == 'POST':\n",
"query = (\"DELETE FROM commentsTable\\t\\t\\t\\tWHERE comment_id = '%s'\" %\n request.form['delete_comment'])\n",
"cursor.execute(query)\n",
"db.commit()\n",
"return redirect(url_for('view_comme... | [
4,
0,
4,
0,
0,
0
] | [
"Condition",
"Condition",
"Assign'",
"Expr'",
"Expr'",
"Return'"
] |
[
"def FUNC_2(self, VAR_3, VAR_4):...\n",
"return self.has_object_permission(VAR_3, VAR_4, VAR_4.instance)\n"
] | [
"def has_permission(self, request, view):...\n",
"return self.has_object_permission(request, view, view.instance)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_11(self):...\n",
"VAR_9 = 'foo'\n",
"VAR_7 = BokChoyTestSuite('', VAR_9=test_dir)\n",
"self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=test_dir))\n"
] | [
"def test_test_dir(self):...\n",
"test_dir = 'foo'\n",
"suite = BokChoyTestSuite('', test_dir=test_dir)\n",
"self.assertEqual(suite.cmd, self._expected_command(name=test_dir))\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Expr'"
] |
[
"def FUNC_39(VAR_62):...\n",
"return json.loads(VAR_62) if VAR_21 else VAR_62\n"
] | [
"def get_str(_str):...\n",
"return json.loads(_str) if as_json else _str\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_3(VAR_13, VAR_14):...\n",
"VAR_28.info('writing %s', VAR_13)\n",
"if os.path.exists(VAR_13):\n",
"VAR_41 = os.stat(VAR_13)\n",
"VAR_42, VAR_43, VAR_44 = 420, -1, -1\n",
"VAR_42, VAR_43, VAR_44 = VAR_41.st_mode, VAR_41.st_uid, VAR_41.st_gid\n",
"VAR_32 = os.path.dirname(VAR_13)\n",
"os.path.e... | [
"def write_file(path, contents):...\n",
"logger.info('writing %s', path)\n",
"if os.path.exists(path):\n",
"stat = os.stat(path)\n",
"mode, uid, gid = 420, -1, -1\n",
"mode, uid, gid = stat.st_mode, stat.st_uid, stat.st_gid\n",
"d = os.path.dirname(path)\n",
"os.path.exists(d) or os.makedirs(d)\n",
... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_0(VAR_0):...\n",
"VAR_12 = ['select', 'delete', 'drop', 'update', 'case', 'and', 'or', 'like']\n",
"def FUNC_6():...\n",
"VAR_13.throw(_('Invalid Search Field'), VAR_13.DataError)\n",
"if len(VAR_0) >= 3:\n",
"if '=' in VAR_0:\n",
"FUNC_6()\n",
"if ' --' in VAR_0:\n",
"FUNC_6()\n",
"if a... | [
"def sanitize_searchfield(searchfield):...\n",
"blacklisted_keywords = ['select', 'delete', 'drop', 'update', 'case', 'and',\n 'or', 'like']\n",
"def _raise_exception():...\n",
"frappe.throw(_('Invalid Search Field'), frappe.DataError)\n",
"if len(searchfield) >= 3:\n",
"if '=' in searchfield:\n",
"_... | [
0,
0,
0,
4,
0,
0,
4,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"FunctionDef'",
"Expr'",
"Condition",
"Condition",
"Expr'",
"Condition",
"Expr'",
"For",
"Expr'",
"For",
"Expr'"
] |
[
"def FUNC_14(self):...\n",
"self._test_health(FUNC_0, cluster.ClusterHealth.GREEN)\n"
] | [
"def test_green_health(self):...\n",
"self._test_health(_validate_conn_up, cluster.ClusterHealth.GREEN)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"def FUNC_0():...\n",
"VAR_0 = CLASS_0()\n",
"VAR_0.run()\n"
] | [
"def main():...\n",
"sh = Shell()\n",
"sh.run()\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'"
] |
[
"def FUNC_6(self, *VAR_4, **VAR_5):...\n",
"VAR_11 = self.REQUEST\n",
"self._zmi_page_request()\n",
"if not VAR_11.get('lang'):\n",
"VAR_11.set('lang', self.getLanguage(VAR_11))\n",
"if not VAR_11.get('manage_lang') in self.getLocale().get_manage_langs():\n",
"VAR_11.set('manage_lang', self.get_manage_l... | [
"def f_standard_html_request(self, *args, **kwargs):...\n",
"request = self.REQUEST\n",
"self._zmi_page_request()\n",
"if not request.get('lang'):\n",
"request.set('lang', self.getLanguage(request))\n",
"if not request.get('manage_lang') in self.getLocale().get_manage_langs():\n",
"request.set('manage_l... | [
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Expr'",
"Condition",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_7(VAR_9, VAR_10):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_3 = HttpRequest()\n",
"VAR_3.method = 'GET'\n",
"VAR_3.session = VAR_10\n",
"VAR_26, VAR_27, VAR_28 = resolve(VAR_9)\n",
"VAR_29 = VAR_26(VAR_3, *VAR_27, **kwargs)\n",
"return VAR_29.content\n"
] | [
"def _local_server_get(url, session):...\n",
"\"\"\"docstring\"\"\"\n",
"request = HttpRequest()\n",
"request.method = 'GET'\n",
"request.session = session\n",
"view, args, kwargs = resolve(url)\n",
"response = view(request, *args, **kwargs)\n",
"return response.content\n"
] | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_14(self, VAR_17):...\n",
"VAR_21 = fs.split_path(VAR_17.path)\n",
"VAR_22 = len(VAR_21)\n",
"VAR_23 = min(self._lensplitpath, VAR_22)\n",
"VAR_25 = len(set(VAR_17.parameters.keys()) - self._targetparam)\n",
"return self._splitpath[:VAR_23] == VAR_21[:VAR_23] and VAR_25 < 2\n"
] | [
"def does_intersect_path(self, pathctx):...\n",
"testpath = fs.split_path(pathctx.path)\n",
"lentestpath = len(testpath)\n",
"lenpath = min(self._lensplitpath, lentestpath)\n",
"extra_count = len(set(pathctx.parameters.keys()) - self._targetparam)\n",
"return self._splitpath[:lenpath] == testpath[:lenpath... | [
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_6(self):...\n",
"return True\n"
] | [
"def Done(self):...\n",
"return True\n"
] | [
0,
0
] | [
"FunctionDef'",
"Return'"
] |
[
"def FUNC_34(self):...\n",
"return self.replace(self.dynamic_fill, '{*}')\n"
] | [
"def format_dynamic(self):...\n",
"return self.replace(self.dynamic_fill, '{*}')\n"
] | [
0,
0
] | [
"FunctionDef'",
"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_36(VAR_16, VAR_22, VAR_23, VAR_29):...\n",
"VAR_53 = 'string'.format(VAR_22, VAR_23, VAR_29)\n",
"VAR_54 = VAR_16.exec(VAR_53)\n",
"VAR_18 = [VAR_41[0] for VAR_41 in VAR_54]\n",
"return VAR_18, VAR_23\n"
] | [
"def get_n_tournaments_after_date(db, scene, date, limit):...\n",
"sql = (\n \"select url, date from matches where scene='{}' and date>='{}' group by url, date order by date desc limit {};\"\n .format(scene, date, limit))\n",
"res = db.exec(sql)\n",
"urls = [r[0] for r in res]\n",
"return urls, date\n... | [
0,
4,
0,
0,
0
] | [
"FunctionDef'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"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_4(self):...\n",
"for clause in self._ruleorder:\n",
"for rulename in clause:\n",
"if not self.is_rule(rulename):\n"
] | [
"def check(self):...\n",
"for clause in self._ruleorder:\n",
"for rulename in clause:\n",
"if not self.is_rule(rulename):\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"For",
"For",
"Condition"
] |
[
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'dashboard_link')\n"
] | [
"@property...\n",
"\"\"\"docstring\"\"\"\n",
"return self.config.get(self.section, 'dashboard_link')\n"
] | [
0,
0,
0
] | [
"Condition",
"Docstring",
"Return'"
] |
[
"@classmethod...\n",
"return '-S-Xfatal-warnings', '-C-Werror'\n"
] | [
"@classmethod...\n",
"return '-S-Xfatal-warnings', '-C-Werror'\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_17(self, VAR_15):...\n",
"\"\"\"docstring\"\"\"\n",
"return LooseVersion(self.sos_info['version']) >= VAR_15\n"
] | [
"def check_sos_version(self, ver):...\n",
"\"\"\"docstring\"\"\"\n",
"return LooseVersion(self.sos_info['version']) >= ver\n"
] | [
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Return'"
] |
[
"def __iter__(self):...\n",
""
] | [
"def __iter__(self):...\n",
""
] | [
0,
0
] | [
"FunctionDef'",
"Condition"
] |
[
"def FUNC_3(self):...\n",
"self._mox.ReplayAll()\n",
"self.assertEqual(url_helper.UrlOpen('url', wait_duration=-1), None)\n",
"self._mox.VerifyAll()\n"
] | [
"def testUrlOpenInvalidWaitDuration(self):...\n",
"self._mox.ReplayAll()\n",
"self.assertEqual(url_helper.UrlOpen('url', wait_duration=-1), None)\n",
"self._mox.VerifyAll()\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"self.common.delete_volume(VAR_7)\n",
"self.common.client_logout()\n"
] | [
"@utils.synchronized('3par', external=True)...\n",
"self.common.client_login()\n",
"self.common.delete_volume(volume)\n",
"self.common.client_logout()\n"
] | [
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_21(VAR_55):...\n",
"@wraps(VAR_55)...\n",
"def FUNC_27(VAR_6):...\n",
"if callable(VAR_6):\n",
"return VAR_6()\n",
"if request.method == 'POST':\n",
"return VAR_55(*VAR_69, **kwargs)\n",
"VAR_10 = json.loads(request.data)\n",
"VAR_54 = {'error': {'type': 'schema', 'message': str(e)}, 'sche... | [
"def decorator(func):...\n",
"@wraps(func)...\n",
"def default_encode(value):...\n",
"if callable(value):\n",
"return value()\n",
"if request.method == 'POST':\n",
"return func(*args, **kwargs)\n",
"body = json.loads(request.data)\n",
"result = {'error': {'type': 'schema', 'message': str(e)}, 'schem... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Condition",
"FunctionDef'",
"Condition",
"Return'",
"Condition",
"Return'",
"Assign'",
"Assign'",
"Expr'",
"Return'",
"Assign'",
"Condition",
"Expr'"
] |
[
"def FUNC_36():...\n",
"yield os.path.join(self.home, 'lib')\n",
"if self.jdk:\n",
"yield os.path.join(self.home, 'jre', 'lib')\n"
] | [
"def lib_paths():...\n",
"yield os.path.join(self.home, 'lib')\n",
"if self.jdk:\n",
"yield os.path.join(self.home, 'jre', 'lib')\n"
] | [
0,
0,
0,
0
] | [
"FunctionDef'",
"Expr'",
"Condition",
"Expr'"
] |
[
"def FUNC_2(self):...\n",
"self.events.append('on_exit: %s' % self.path)\n"
] | [
"def on_exit(self):...\n",
"self.events.append('on_exit: %s' % self.path)\n"
] | [
0,
0
] | [
"FunctionDef'",
"Expr'"
] |
[
"import unittest\n",
"import pandas as pd\n",
"import numpy as np\n",
"import datetime\n",
"from ddt import ddt, data, unpack\n",
"from scraper import scrape\n",
"from wrangler import clean_job_number, clean_pub_date, clean_city, clean_company_name, get_acronyms, get_street_number, get_street_name, clea... | [
"import unittest\n",
"import pandas as pd\n",
"import numpy as np\n",
"import datetime\n",
"from ddt import ddt, data, unpack\n",
"from scraper import scrape\n",
"from wrangler import clean_job_number, clean_pub_date, clean_city, clean_company_name, get_acronyms, get_street_number, get_street_name, clea... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
4,
0,
0,
4,
4,
4,
4,
0,
4... | [
"Import'",
"Import'",
"Import'",
"Import'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"ImportFrom'",
"Import'",
"Assign'",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Expr'",
"Condit... |
[
"@defer.inlineCallbacks...\n",
"self.obj_path = yield db.transact(lambda : [db.ref(db.get_root()['oms_root'])]\n )()\n"
] | [
"@defer.inlineCallbacks...\n",
"self.obj_path = yield db.transact(lambda : [db.ref(db.get_root()['oms_root'])]\n )()\n"
] | [
0,
0
] | [
"Condition",
"Assign'"
] |
[
"@staticmethod...\n",
"return {'files': ['file_opened', 'file_read'], 'registry': ['regkey_opened',\n 'regkey_written', 'regkey_read'], 'mutexes': ['mutex'], 'directories':\n ['directory_created', 'directory_removed', 'directory_enumerated'],\n 'processes': ['command_line', 'dll_loaded']}\n"
] | [
"@staticmethod...\n",
"return {'files': ['file_opened', 'file_read'], 'registry': ['regkey_opened',\n 'regkey_written', 'regkey_read'], 'mutexes': ['mutex'], 'directories':\n ['directory_created', 'directory_removed', 'directory_enumerated'],\n 'processes': ['command_line', 'dll_loaded']}\n"
] | [
0,
0
] | [
"Condition",
"Return'"
] |
[
"def FUNC_7(VAR_17, *VAR_18, **VAR_19):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_20 = VAR_17.POST\n",
"VAR_21 = VAR_20.get('new_status')\n",
"if not VAR_21:\n",
"if not VAR_8 or not callable(VAR_8):\n",
"if not 'fields' in VAR_20:\n",
"return error_handler.logErrorAndReturnOK(\n 'No valid status can ... | [
"def manageModelsStatus(request, *args, **kwargs):...\n",
"\"\"\"docstring\"\"\"\n",
"post_dict = request.POST\n",
"new_status = post_dict.get('new_status')\n",
"if not new_status:\n",
"if not status_retriever or not callable(status_retriever):\n",
"if not 'fields' in post_dict:\n",
"return error_hand... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
5
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Condition",
"Return'",
"Expr'",
"Assign'",
"Assign'",
"For",
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Return'",
"Return'"
] |
[
"def FUNC_14(self, VAR_19, VAR_20):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.reached_corner[self.corner_counter]:\n",
"self.reached_corner[self.corner_counter] = self.navloc.goToPosition(VAR_20[\n self.corner_counter][0] * VAR_19, VAR_20[self.corner_counter][1] * VAR_19)\n",
"self.logArrival('corne... | [
"def testSquare(self, length, corners):...\n",
"\"\"\"docstring\"\"\"\n",
"if not self.reached_corner[self.corner_counter]:\n",
"self.reached_corner[self.corner_counter] = self.navloc.goToPosition(corners\n [self.corner_counter][0] * length, corners[self.corner_counter][1] * length\n )\n",
"self.logAr... | [
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Condition",
"Assign'",
"Expr'",
"Condition",
"Assign'",
"Assign'"
] |
[
"def __init__(self, VAR_18, VAR_35=10000, VAR_36=errors.BAD_COMMENT, VAR_37=...\n",
"CLASS_0.__init__(self, VAR_18, **kw)\n",
"self.length = VAR_35\n",
"self.len_error = VAR_37\n",
"self.emp_error = VAR_36\n"
] | [
"def __init__(self, item, length=10000, empty_error=errors.BAD_COMMENT,...\n",
"Validator.__init__(self, item, **kw)\n",
"self.length = length\n",
"self.len_error = length_error\n",
"self.emp_error = empty_error\n"
] | [
0,
0,
0,
0,
0
] | [
"Condition",
"Expr'",
"Assign'",
"Assign'",
"Assign'"
] |
[
"def __init__(self, VAR_64):...\n",
"self.func = VAR_64\n",
"self.shellcmd = None\n",
"self.norun = False\n",
"self.input = None\n",
"self.output = None\n",
"self.params = None\n",
"self.message = None\n",
"self.benchmark = None\n",
"self.threads = None\n",
"self.resources = None\n",
"self.pri... | [
"def __init__(self, func):...\n",
"self.func = func\n",
"self.shellcmd = None\n",
"self.norun = False\n",
"self.input = None\n",
"self.output = None\n",
"self.params = None\n",
"self.message = None\n",
"self.benchmark = None\n",
"self.threads = None\n",
"self.resources = None\n",
"self.priorit... | [
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'",
"Docstring"
] |
[
"def FUNC_3(self):...\n",
"self.expected_requests([(\n 'http://localhost/auth/api/v1/accounts/self/xsrf_token', {'data': {},\n 'headers': {'X-XSRF-Token-Request': '1'}}, {'expiration_sec': 100,\n 'xsrf_token': 'token'}), ('http://localhost/a', {'data': {'foo': 'bar'},\n 'headers': {'X-XSRF-Token': 'to... | [
"def testXsrfRemoteRefresh(self):...\n",
"self.expected_requests([(\n 'http://localhost/auth/api/v1/accounts/self/xsrf_token', {'data': {},\n 'headers': {'X-XSRF-Token-Request': '1'}}, {'expiration_sec': 100,\n 'xsrf_token': 'token'}), ('http://localhost/a', {'data': {'foo': 'bar'},\n 'headers': {'X-X... | [
0,
5,
5,
0,
5,
5,
0
] | [
"FunctionDef'",
"Expr'",
"Assign'",
"Assign'",
"Expr'",
"Expr'",
"Expr'"
] |
[
"def FUNC_8(self):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_14 = self.session.get('https://www.kijiji.ca/m-my-ads.html')\n",
"VAR_27 = FUNC_0(VAR_14.text, 'userId')\n",
"VAR_28 = (\n 'https://www.kijiji.ca/j-get-my-ads.json?_=1¤tOffset=0&isPromoting=false&show=ACTIVE&user={}'\n .format(VAR_27))\n"... | [
"def get_all_ads(self):...\n",
"\"\"\"docstring\"\"\"\n",
"resp = self.session.get('https://www.kijiji.ca/m-my-ads.html')\n",
"user_id = get_token(resp.text, 'userId')\n",
"my_ads_url = (\n 'https://www.kijiji.ca/j-get-my-ads.json?_=1¤tOffset=0&isPromoting=false&show=ACTIVE&user={}'\n .format(us... | [
0,
0,
0,
5,
5,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Return'"
] |
[
"def FUNC_0(self, VAR_2, VAR_3, VAR_4, VAR_5):...\n",
"\"\"\"docstring\"\"\"\n",
"VAR_6 = []\n",
"VAR_7 = self.pool.get('ir.model.data')\n",
"VAR_8 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3).company_id.id\n",
"VAR_9 = self.pool.get('account.bank.statement')\n",
"VAR_10 = self.pool.get('ir.... | [
"def open_statement(self, cr, uid, ids, context):...\n",
"\"\"\"docstring\"\"\"\n",
"list_statement = []\n",
"mod_obj = self.pool.get('ir.model.data')\n",
"company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id\n",
"statement_obj = self.pool.get('account.bank.statement')\n",
"sequenc... | [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
4,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
] | [
"FunctionDef'",
"Docstring",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Assign'",
"Expr'",
"Assign'",
"Expr'",
"Assign'",
"For",
"Assign'",
"Assign'",
"Condition",
"Assign'",
"Assign'",
"Assign'",
"Condition",
"Condition",
"Assign'",
"Assign'",
"Assign'",
... |
[
"@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'"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.