lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_6(self, VAR_7):...\n", "VAR_8 = self.content\n", "while VAR_8:\n", "yield VAR_8[:VAR_7]\n", "VAR_8 = VAR_8[VAR_7:]\n" ]
[ "def iter_content(self, chunk_size):...\n", "c = self.content\n", "while c:\n", "yield c[:chunk_size]\n", "c = c[chunk_size:]\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_17(self, VAR_6):...\n", "shellutil.run('/etc/rc.d/dhclient restart {0}'.format(VAR_6), VAR_10=False)\n" ]
[ "def restart_if(self, ifname):...\n", "shellutil.run('/etc/rc.d/dhclient restart {0}'.format(ifname), chk_err=False)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_20(self):...\n", "self.cursor.execute(self.sql)\n" ]
[ "def _exec(self):...\n", "self.cursor.execute(self.sql)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@api.require(lambda : True)...\n", "" ]
[ "@api.require(lambda : True)...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_13(self):...\n", "VAR_19 = list(filter(lambda VAR_28: VAR_28.protected, self.expanded_output))\n", "if VAR_19:\n" ]
[ "def check_protected_output(self):...\n", "protected = list(filter(lambda f: f.protected, self.expanded_output))\n", "if protected:\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition" ]
[ "def FUNC_3(self, VAR_1, VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "VAR_21, VAR_23 = self._find(VAR_1)\n", "if VAR_7 not in VAR_21.uread:\n", "return [[], []]\n", "VAR_24 = VAR_21.realpath\n", "if VAR_23:\n", "VAR_24 += '/' + VAR_23\n", "VAR_25 = os.listdir(VAR_24)\n", "VAR_25.sort()\n", "if VAR...
[ "def ls(self, vpath, user):...\n", "\"\"\"docstring\"\"\"\n", "vn, rem = self._find(vpath)\n", "if user not in vn.uread:\n", "return [[], []]\n", "rp = vn.realpath\n", "if rem:\n", "rp += '/' + rem\n", "real = os.listdir(rp)\n", "real.sort()\n", "if rem:\n", "virt_vis = []\n", "virt_all = []...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Condition", "AugAssign'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "For", "Expr'", "Return'", "Expr'", "For", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_3(VAR_4):...\n", "\"\"\"docstring\"\"\"\n" ]
[ "def traverse(name):...\n", "\"\"\"docstring\"\"\"\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Docstring" ]
[ "def __str__(self):...\n", "return f'<RoamPathException: {self.path.description()}>'\n" ]
[ "def __str__(self):...\n", "return f'<RoamPathException: {self.path.description()}>'\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "self.sql_session.close()\n" ]
[ "def on_finish(self):...\n", "\"\"\"docstring\"\"\"\n", "self.sql_session.close()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'" ]
[ "def FUNC_5(self):...\n", "VAR_2 = self.prepare_args()\n", "VAR_2.limit = self.add_limit()\n", "if VAR_2.conditions:\n", "VAR_2.conditions = 'where ' + VAR_2.conditions\n", "if self.distinct:\n", "VAR_2.fields = 'distinct ' + VAR_2.fields\n", "VAR_7 = (\n \"\"\"select %(fields)s from %(tables)s %(c...
[ "def build_and_run(self):...\n", "args = self.prepare_args()\n", "args.limit = self.add_limit()\n", "if args.conditions:\n", "args.conditions = 'where ' + args.conditions\n", "if self.distinct:\n", "args.fields = 'distinct ' + args.fields\n", "query = (\n \"\"\"select %(fields)s from %(tables)s %(c...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_47(self, VAR_14):...\n", "return list(self.list_properties[VAR_14].local_columns)[0]\n" ]
[ "def get_relation_fk(self, col_name):...\n", "return list(self.list_properties[col_name].local_columns)[0]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.priority = VAR_77\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.priority = priority\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_17(self, VAR_19, VAR_18, VAR_20):...\n", "return None\n" ]
[ "def get_parameters(self, key, levelctx, pathctxlist):...\n", "return None\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_9(self, VAR_21, VAR_27, VAR_28, VAR_29, VAR_30, VAR_31=None):...\n", "\"\"\"docstring\"\"\"\n", "if self.newcount > 10000:\n", "return False\n", "if VAR_31 is None:\n", "VAR_31 = time.time()\n", "VAR_58 = self.get_path(os.path.dirname(VAR_21))\n", "VAR_59 = os.path.basename(VAR_21)\n", "if...
[ "def mkfile(self, path, uid, gid, size, mode, ctime=None):...\n", "\"\"\"docstring\"\"\"\n", "if self.newcount > 10000:\n", "return False\n", "if ctime is None:\n", "ctime = time.time()\n", "dir = self.get_path(os.path.dirname(path))\n", "outfile = os.path.basename(path)\n", "if outfile in [x[A_NAME...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "AugAssign'", "Return'" ]
[ "@mock.patch('requests.post', FUNC_0)...\n", "\"\"\"docstring\"\"\"\n", "self.client.login(username='autotest2', password='password')\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "self.client.login(usernam...
[ "@mock.patch('requests.post', mock_import_repository_task)...\n", "\"\"\"docstring\"\"\"\n", "self.client.login(username='autotest2', password='password')\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", ...
[ 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_25(self):...\n", "if not self._IsServerAlive():\n", "return\n", "VAR_23 = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n", "vimsupport.PostVimMessage(str(e))\n", "if 'message' in VAR_23:\n", "vimsupport.EchoText(VAR_23['message'])\n" ]
[ "def ShowDetailedDiagnostic(self):...\n", "if not self._IsServerAlive():\n", "return\n", "debug_info = BaseRequest.PostDataToHandler(BuildRequestData(),\n 'detailed_diagnostic')\n", "vimsupport.PostVimMessage(str(e))\n", "if 'message' in debug_info:\n", "vimsupport.EchoText(debug_info['message'])\n" ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_11(self, VAR_14):...\n", "return VAR_14.endswith('.java')\n" ]
[ "def select_source(self, source_file_path):...\n", "return source_file_path.endswith('.java')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self, VAR_1, VAR_2, VAR_5, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_30 = VAR_4.get('states', [])\n", "VAR_31 = VAR_4.get('what', ())\n", "if not VAR_5:\n", "VAR_5 = self.search(VAR_1, VAR_2, [])\n", "VAR_29 = {}.fromkeys(VAR_5, 0.0)\n", ...
[ "def get_product_available(self, cr, uid, ids, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "states = context.get('states', [])\n", "what = context.get('what', ())\n", "if not ids:\n", "ids = self.search(cr, uid, [])\n", "res = {}.fromkeys(ids, 0.0)\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, 4, 0, 0, 4, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition"...
[ "def FUNC_14(VAR_0, VAR_12, VAR_3, VAR_4):...\n", "if VAR_12[0] < 0:\n", "VAR_31 = VAR_3[VAR_12[0]]\n", "VAR_31 = VAR_12[0]\n", "if VAR_12[1] < 0:\n", "FUNC_12(VAR_31)\n", "VAR_32 = VAR_3[VAR_12[1]]\n", "VAR_32 = VAR_12[1]\n", "VAR_7 = SymbolicInput(VAR_4[0], VAR_0, VAR_31, VAR_32)\n", "FUNC_12(VA...
[ "def ltgt(op, params, symbols, symId):...\n", "if params[0] < 0:\n", "p0 = symbols[params[0]]\n", "p0 = params[0]\n", "if params[1] < 0:\n", "makeUnsigned256(p0)\n", "p1 = symbols[params[1]]\n", "p1 = params[1]\n", "x = SymbolicInput(symId[0], op, p0, p1)\n", "makeUnsigned256(p1)\n", "symbols[sy...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "AugAssign'", "Return'" ]
[ "def FUNC_2(self, VAR_6, VAR_15, VAR_16, VAR_17, VAR_7, VAR_8):...\n", "VAR_22 = 'string' + \"('%s', '%s', '%s', '%s', '%s', '%s', '%s')\" % (VAR_6,\n datetime.now(), VAR_15, VAR_16, VAR_17, VAR_7, VAR_8)\n", "self.cur.execute(VAR_22)\n", "self.conn.commit()\n", "return self.cur.lastrowid\n" ]
[ "def insert_result_feedback(self, qhash, is_know, reason, label, ip, browser):...\n", "sql = (\n 'INSERT INTO feedback_result (query_hash, reported_at, is_know, reason, feedback_label, client_ip, client_browser) VALUES'\n + \"('%s', '%s', '%s', '%s', '%s', '%s', '%s')\" % (qhash, datetime.now(\n ), is_k...
[ 0, 4, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_12(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_14, VAR_15 = new_monitor_log_file(self._ray_params.redirect_output)\n", "VAR_16 = ray.services.start_monitor(self._redis_address, self.\n _node_ip_address, VAR_14=stdout_file, VAR_15=stderr_file,\n autoscaling_config=self._ray_params.autoscaling...
[ "def start_monitor(self):...\n", "\"\"\"docstring\"\"\"\n", "stdout_file, stderr_file = new_monitor_log_file(self._ray_params.\n redirect_output)\n", "process_info = ray.services.start_monitor(self._redis_address, self.\n _node_ip_address, stdout_file=stdout_file, stderr_file=stderr_file,\n autoscali...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_0(self):...\n", "if self.env.user != self.env.ref('base.public_user'):\n", "VAR_21 = self.env.user.partner_id.email\n", "for event in self:\n", "VAR_22 = ['&', '|', ('email', '=', VAR_21), ('partner_id', '=', self.env.\n user.partner_id.id), ('event_id', '=', event.id), ('state', '=', 'open')]\...
[ "def _fit_compute_is_participating(self):...\n", "if self.env.user != self.env.ref('base.public_user'):\n", "email = self.env.user.partner_id.email\n", "for event in self:\n", "domain = ['&', '|', ('email', '=', email), ('partner_id', '=', self.env.\n user.partner_id.id), ('event_id', '=', event.id), ('s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def __init__(self, VAR_18, *VAR_15, **VAR_16):...\n", "CLASS_3.__init__(self, VAR_18, errors.NO_URL, *VAR_15, **kw)\n" ]
[ "def __init__(self, item, *a, **kw):...\n", "VRequired.__init__(self, item, errors.NO_URL, *a, **kw)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(self):...\n", "VAR_4 = {'username': 'firstuser', 'password': 'password', 'email':\n 'autotest@deis.io'}\n", "VAR_5 = '/api/auth/register'\n", "VAR_6 = self.client.post(VAR_5, json.dumps(VAR_4), content_type=\n 'application/json')\n", "self.assertEqual(VAR_6.status_code, 201)\n", "self.as...
[ "def test_list(self):...\n", "submit = {'username': 'firstuser', 'password': 'password', 'email':\n 'autotest@deis.io'}\n", "url = '/api/auth/register'\n", "response = self.client.post(url, json.dumps(submit), content_type=\n 'application/json')\n", "self.assertEqual(response.status_code, 201)\n", "...
[ 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_6():...\n", "if not VAR_12 or not VAR_10 or not VAR_10.poll():\n", "return\n", "VAR_20 = VAR_10.recv()\n", "if VAR_20:\n", "VAR_39 = '{{\"message\":\"{}\", \"action\":\"{}\"}}'.format(VAR_20.replace('\\n',\n '\\\\n').replace('\\t', ''), 'printMessage')\n", "for client in VAR_12:\n", "clie...
[ "def updateScriptStatus():...\n", "if not runScriptWebSocketConnections or not scriptPipeConnection or not scriptPipeConnection.poll(\n", "return\n", "pipeOutput = scriptPipeConnection.recv()\n", "if pipeOutput:\n", "responseMessage = '{{\"message\":\"{}\", \"action\":\"{}\"}}'.format(pipeOutput.\n rep...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "For", "Expr'", "Condition", "Expr'", "Expr'", "Assign'", "For", "Expr'", "Expr'" ]
[ "def FUNC_15(self):...\n", "VAR_21 = []\n", "if isinstance(self.model_field, SmartListFilter):\n", "VAR_21 = [CLASS_6(self.model_field.parameter_name, choice[1], choice[0],\n self.query_params) for choice in self.model_field.lookups()]\n", "if self.model_field.choices:\n", "return [CLASS_6(self.field_n...
[ "def get_values(self):...\n", "values = []\n", "if isinstance(self.model_field, SmartListFilter):\n", "values = [SmartFilterValue(self.model_field.parameter_name, choice[1],\n choice[0], self.query_params) for choice in self.model_field.lookups()]\n", "if self.model_field.choices:\n", "return [SmartFil...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_0(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_0 = VAR_1\n" ]
[ "def set_path(new_path):...\n", "\"\"\"docstring\"\"\"\n", "path = new_path\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'" ]
[ "@property...\n", "return self._log\n" ]
[ "@property...\n", "return self._log\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def __call__(self, VAR_2, VAR_3, VAR_4=None):...\n", "if VAR_3.strip():\n", "return\n", "if VAR_44 is not None:\n", "VAR_22 = datetime.now(VAR_44.UTC)\n", "VAR_22 = datetime.utcnow()\n", "if self._timezone is not None:\n", "self.reply(VAR_2, self._format_date(VAR_22))\n", "VAR_22 = VAR_22.astimezon...
[ "def __call__(self, msg, arguments, errorSink=None):...\n", "if arguments.strip():\n", "return\n", "if pytz is not None:\n", "dt = datetime.now(pytz.UTC)\n", "dt = datetime.utcnow()\n", "if self._timezone is not None:\n", "self.reply(msg, self._format_date(dt))\n", "dt = dt.astimezone(self._timezone...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_14(VAR_6, VAR_11=False):...\n", "VAR_15 = [VAR_4._create_compiler_jardep(VAR_6)]\n", "if VAR_11:\n", "VAR_20 = JarDependency(org='org.scala-lang', VAR_5='jline', rev=\n scala_build_info[version].full_version)\n", "VAR_4.register_jvm_tool(VAR_8, VAR_4._key_for_tool_version('scala-repl',\n VAR...
[ "def register_scala_repl_tool(version, with_jline=False):...\n", "classpath = [cls._create_compiler_jardep(version)]\n", "if with_jline:\n", "jline_dep = JarDependency(org='org.scala-lang', name='jline', rev=\n scala_build_info[version].full_version)\n", "cls.register_jvm_tool(register, cls._key_for_tool...
[ 0, 0, 0, 0, 7, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_2(self, VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_8 == '/':\n", "return True\n", "VAR_7 = self.to_route()\n", "return len(VAR_7) >= len(VAR_8) and VAR_7.startswith(VAR_8) and (len(VAR_7) ==\n len(VAR_8) or VAR_7[len(VAR_8)] == '/')\n" ]
[ "def contains(self, prefix):...\n", "\"\"\"docstring\"\"\"\n", "if prefix == '/':\n", "return True\n", "path = self.to_route()\n", "return len(path) >= len(prefix) and path.startswith(prefix) and (len(path) ==\n len(prefix) or path[len(prefix)] == '/')\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Return'" ]
[ "@eqlx.with_timeout...\n", "time.sleep(1)\n" ]
[ "@eqlx.with_timeout...\n", "time.sleep(1)\n" ]
[ 0, 0 ]
[ "Condition", "Expr'" ]
[ "def FUNC_7(self):...\n", "VAR_2 = CLASS_1.construct_testscript_command('test_input_program.py')\n", "VAR_3, VAR_4 = run_shell_command(VAR_2, '1 4 10 22')\n", "self.assertEqual(VAR_3, '37\\n')\n", "self.assertEqual(VAR_4, '')\n", "VAR_3, VAR_4 = run_shell_command(VAR_2, '1 p 5')\n", "self.assertEqual...
[ "def test_run_shell_command_with_stdin(self):...\n", "command = RunShellCommandTest.construct_testscript_command(\n 'test_input_program.py')\n", "stdout, stderr = run_shell_command(command, '1 4 10 22')\n", "self.assertEqual(stdout, '37\\n')\n", "self.assertEqual(stderr, '')\n", "stdout, stderr = ru...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_23(self, VAR_16, VAR_22):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', VAR_16['name'], 'size', '%sG' % VAR_22)\n", "VAR_0.error(_(\n 'Failed to extend_volume %(name)s from %(current_size)sGB to %(new_size)sGB'\n ), {'name': VAR_16['name'], 'current_size': VAR_16['si...
[ "def extend_volume(self, volume, new_size):...\n", "\"\"\"docstring\"\"\"\n", "self._eql_execute('volume', 'select', volume['name'], 'size', '%sG' % new_size)\n", "LOG.error(_(\n 'Failed to extend_volume %(name)s from %(current_size)sGB to %(new_size)sGB'\n ), {'name': volume['name'], 'current_size': vo...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_0, VAR_1=None, VAR_2=None):...\n", "self.encoder = VAR_2\n", "super().__init__(VAR_0, VAR_1=dumps)\n" ]
[ "def __init__(self, adapted, dumps=None, encoder=None):...\n", "self.encoder = encoder\n", "super().__init__(adapted, dumps=dumps)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_3(self, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6, VAR_7, VAR_8 = self.redis_client.hmget(VAR_2, ['driver_id',\n 'function', 'run_on_other_drivers'])\n", "if utils.decode(VAR_8\n", "return\n", "VAR_10 = pickle.loads(VAR_7)\n", "VAR_11 = traceback.format_exc()\n", "VAR_10({'worker':...
[ "def fetch_and_execute_function_to_run(self, key):...\n", "\"\"\"docstring\"\"\"\n", "driver_id, serialized_function, run_on_other_drivers = self.redis_client.hmget(\n key, ['driver_id', 'function', 'run_on_other_drivers'])\n", "if utils.decode(run_on_other_drivers\n", "return\n", "function = pickle.lo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_7(self, VAR_4):...\n", "self.wait_next()\n", "self.log.total += 1\n", "VAR_4.execute()\n", "print('Unhandled exception while executing the request: %s' % exc, file=sys\n .stderr)\n", "self.log.__dict__[VAR_4.outcome] += 1\n", "return\n", "self.log.total_time += VAR_4.duration\n", "self....
[ "def do_step(self, request):...\n", "self.wait_next()\n", "self.log.total += 1\n", "request.execute()\n", "print('Unhandled exception while executing the request: %s' % exc, file=sys\n .stderr)\n", "self.log.__dict__[request.outcome] += 1\n", "return\n", "self.log.total_time += request.duration\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "AugAssign'", "Expr'", "Expr'", "AugAssign'", "Return'", "AugAssign'", "Assign'", "Expr'" ]
[ "def FUNC_1(self, VAR_0, *VAR_2, **VAR_3):...\n", "VAR_11 = JustURLForm()\n", "return render(VAR_0, 'custom-short-url.html', {'form': VAR_11})\n" ]
[ "def get(self, request, *args, **kwargs):...\n", "form = JustURLForm()\n", "return render(request, 'custom-short-url.html', {'form': form})\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_8():...\n", "VAR_17 = False\n", "VAR_18 = 'campaign-data/' + str(self.campaign_data['id']) + '/results/' + str(\n self.result_data['id'])\n", "os.makedirs(VAR_18)\n", "VAR_19 = VAR_18 + '/' + self.campaign_data['output_file']\n", "VAR_20 = 'campaign-data/' + str(self.campaign_data['id']\n ...
[ "def check_output():...\n", "missing_output = False\n", "result_folder = 'campaign-data/' + str(self.campaign_data['id']\n ) + '/results/' + str(self.result_data['id'])\n", "os.makedirs(result_folder)\n", "output_location = result_folder + '/' + self.campaign_data['output_file']\n", "gold_location = 'c...
[ 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'", "Expr'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Condition", "Expr'", "Condition", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ "@utils.synchronized('3par', external=True)...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_15(self, VAR_17, VAR_18):...\n", "VAR_21 = fs.split_path(VAR_17.path)\n", "VAR_23 = min(self._lensplitpath, len(VAR_21))\n", "if self._splitpath[:VAR_23] == VAR_21[:VAR_23]:\n", "self._store[VAR_23].append(VAR_17)\n" ]
[ "def test(self, pathctx, levelctx):...\n", "testpath = fs.split_path(pathctx.path)\n", "lenpath = min(self._lensplitpath, len(testpath))\n", "if self._splitpath[:lenpath] == testpath[:lenpath]:\n", "self._store[lenpath].append(pathctx)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_19(self, VAR_2, VAR_3, VAR_19, VAR_20={}, VAR_7={}):...\n", "VAR_20 = VAR_20 or {}\n", "VAR_20['work_ids'] = []\n", "return super(VAR_23, self).copy_data(VAR_2, VAR_3, VAR_19, VAR_20, VAR_7)\n" ]
[ "def copy_data(self, cr, uid, id, default={}, context={}):...\n", "default = default or {}\n", "default['work_ids'] = []\n", "return super(task, self).copy_data(cr, uid, id, default, context)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_28):...\n", "if VAR_28 is None:\n", "VAR_28 = 0\n", "return VAR_55(int(VAR_28), 0)\n" ]
[ "def run(self, count):...\n", "if count is None:\n", "count = 0\n", "return max(int(count), 0)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_4(self, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/keys'\n", "VAR_5 = {'id': 'mykey@box.local', 'public': VAR_3}\n", "VAR_6 = self.client.post(VAR_4, json.dumps(VAR_5), content_type=\n 'application/json')\n", "self.assertEqual(VAR_6.status_code, 201)\n", "VAR_6 = self.client.p...
[ "def _check_duplicate_key(self, pubkey):...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/keys'\n", "body = {'id': 'mykey@box.local', 'public': pubkey}\n", "response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n", "self.assertEqual(response.status_code, 201)\n", "respo...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def __gt__(self, VAR_16):...\n", "VAR_39 = self.workflow._ruleorder.compare(self, VAR_16)\n", "return VAR_39 > 0\n" ]
[ "def __gt__(self, rule):...\n", "comp = self.workflow._ruleorder.compare(self, rule)\n", "return comp > 0\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "from django.db import models, migrations\n", "import django.core.validators\n", "VAR_0 = [('userprofile', '0001_initial')]\n", "VAR_1 = [migrations.CreateModel(name='Course', fields=[('id', models.\n AutoField(verbose_name='ID', serialize=False, auto_created=True,\n primary_key=True)), ('name', models....
[ "from django.db import models, migrations\n", "import django.core.validators\n", "dependencies = [('userprofile', '0001_initial')]\n", "operations = [migrations.CreateModel(name='Course', fields=[('id', models.\n AutoField(verbose_name='ID', serialize=False, auto_created=True,\n primary_key=True)), ('na...
[ 0, 0, 0, 4 ]
[ "ImportFrom'", "Import'", "Assign'", "Assign'" ]
[ "def FUNC_10(self, *VAR_11, **VAR_12):...\n", "for VAR_9 in VAR_11:\n", "self._set_params_item(VAR_9)\n", "for VAR_10, VAR_9 in VAR_12.items():\n", "self._set_params_item(VAR_9, VAR_10=name)\n" ]
[ "def set_params(self, *params, **kwparams):...\n", "for item in params:\n", "self._set_params_item(item)\n", "for name, item in kwparams.items():\n", "self._set_params_item(item, name=name)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "For", "Expr'" ]
[ "@detail_route(methods=['post'])...\n", "return self.set_pending_action(pending_actions.REMOVE, *VAR_13, VAR_12=(\n 'delete_project',), **kwargs)\n" ]
[ "@detail_route(methods=['post'])...\n", "return self.set_pending_action(pending_actions.REMOVE, *args, perms=(\n 'delete_project',), **kwargs)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@property...\n", "return self._params\n" ]
[ "@property...\n", "return self._params\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_7(self, VAR_9, VAR_11=None):...\n", "get_and_check_project(VAR_9, VAR_11)\n", "VAR_25 = self.queryset.filter(VAR_1=project_pk)\n", "VAR_25 = filters.OrderingFilter().filter_queryset(self.request, VAR_25, self)\n", "VAR_26 = CLASS_1(VAR_25, many=True)\n", "return Response(VAR_26.data)\n" ]
[ "def list(self, request, project_pk=None):...\n", "get_and_check_project(request, project_pk)\n", "tasks = self.queryset.filter(project=project_pk)\n", "tasks = filters.OrderingFilter().filter_queryset(self.request, tasks, self)\n", "serializer = TaskSerializer(tasks, many=True)\n", "return Response(seria...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "VAR_8 = 'test_foo.py'\n", "VAR_7 = BokChoyTestSuite('', test_spec=spec, default_store='draft')\n", "VAR_1 = 'tests/{}'.format(VAR_8)\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name, VAR_2='draft'))\n" ]
[ "def test_spec_with_draft_default_store(self):...\n", "spec = 'test_foo.py'\n", "suite = BokChoyTestSuite('', test_spec=spec, default_store='draft')\n", "name = 'tests/{}'.format(spec)\n", "self.assertEqual(suite.cmd, self._expected_command(name=name, store='draft'))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_1(*VAR_0, **VAR_1):...\n", "" ]
[ "def _validate_conn_down(*args, **kwargs):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_5(self):...\n", "" ]
[ "def do_put(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@frappe.whitelist(allow_guest=True)...\n", "from frappe.www.contact import send_message as website_send_message\n", "VAR_4 = VAR_5 = None\n", "website_send_message(VAR_0, VAR_1, VAR_2)\n", "VAR_5 = frappe.db.sql('string'.format(email_id=sender))\n", "if not VAR_5:\n", "VAR_4 = frappe.db.get_value('Lead...
[ "@frappe.whitelist(allow_guest=True)...\n", "from frappe.www.contact import send_message as website_send_message\n", "lead = customer = None\n", "website_send_message(subject, message, sender)\n", "customer = frappe.db.sql(\n \"\"\"select distinct dl.link_name from `tabDynamic Link` dl\n\t\tleft join `ta...
[ 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "ImportFrom'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_3(self, VAR_1, VAR_2, VAR_5, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_30 = VAR_4.get('states', [])\n", "VAR_31 = VAR_4.get('what', ())\n", "if not VAR_5:\n", "VAR_5 = self.search(VAR_1, VAR_2, [])\n", "VAR_29 = {}.fromkeys(VAR_5, 0.0)\n", ...
[ "def get_product_available(self, cr, uid, ids, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "states = context.get('states', [])\n", "what = context.get('what', ())\n", "if not ids:\n", "ids = self.search(cr, uid, [])\n", "res = {}.fromkeys(ids, 0.0)\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, 4, 0, 0, 4, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition"...
[ "@property...\n", "return filter(lambda VAR_28: VAR_28.exists, self.expanded_output)\n" ]
[ "@property...\n", "return filter(lambda f: f.exists, self.expanded_output)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_5(self, VAR_13, VAR_14=1):...\n", "utils.check_ssh_injection(VAR_13)\n", "VAR_11 = ' '.join(VAR_13)\n", "if not self.sshpool:\n", "VAR_39 = self.configuration.san_password\n", "VAR_43 = VAR_14\n", "VAR_0.error(_('Error running SSH command: %s') % VAR_11)\n", "VAR_40 = self.configuration.san_...
[ "def _run_ssh(self, cmd_list, attempts=1):...\n", "utils.check_ssh_injection(cmd_list)\n", "command = ' '.join(cmd_list)\n", "if not self.sshpool:\n", "password = self.configuration.san_password\n", "total_attempts = attempts\n", "LOG.error(_('Error running SSH command: %s') % command)\n", "privatekey...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Assign'", "AugAssign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Return'", "Expr'" ]
[ "\"\"\"\nCreated on 2012-8-9\n\n@author: diracfang\n\"\"\"\n", "def __init__(self, VAR_0, VAR_1):...\n", "self.db = VAR_0\n", "self.access_token = VAR_1\n", "def FUNC_0(self):...\n", "if not hasattr(self, '_user'):\n", "VAR_3 = (\"select * from account_access where access_token = '%s'\" % self.\n acc...
[ "\"\"\"\nCreated on 2012-8-9\n\n@author: diracfang\n\"\"\"\n", "def __init__(self, db, access_token):...\n", "self.db = db\n", "self.access_token = access_token\n", "def get_user(self):...\n", "if not hasattr(self, '_user'):\n", "qs = (\"select * from account_access where access_token = '%s'\" % self.\n...
[ 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0 ]
[ "Expr'", "FunctionDef'", "Assign'", "Assign'", "FunctionDef'", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_16(self, VAR_8, **VAR_9):...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = dict()\n", "VAR_22.update(self.rule.workflow.globals)\n", "VAR_22.update(dict(input=self.input, output=self.output, VAR_24=self.params,\n VAR_16=self._format_wildcards, threads=self.threads, VAR_23=self.\n resources, log=s...
[ "def format_wildcards(self, string, **variables):...\n", "\"\"\"docstring\"\"\"\n", "_variables = dict()\n", "_variables.update(self.rule.workflow.globals)\n", "_variables.update(dict(input=self.input, output=self.output, params=self.\n params, wildcards=self._format_wildcards, threads=self.threads,\n ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "@FUNC_1.command(aliases=['sys'])...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = asyncio.get_event_loop()\n", "VAR_7 = await VAR_6.run_in_executor(None, self.system_search, VAR_2)\n", "await VAR_1.send(VAR_7)\n" ]
[ "@eddb.command(aliases=['sys'])...\n", "\"\"\"docstring\"\"\"\n", "loop = asyncio.get_event_loop()\n", "result = await loop.run_in_executor(None, self.system_search, inp)\n", "await ctx.send(result)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_5(self):...\n", "self.init()\n", "logging.info('record by user: %s' % users.get_current_user())\n", "VAR_16 = model.Report.all().ancestor(self.version).filter('facility_name =',\n self.params.facility_name).order('-timestamp').get()\n", "VAR_2 = model.Report(self.version, facility_name=self.fac...
[ "def post(self):...\n", "self.init()\n", "logging.info('record by user: %s' % users.get_current_user())\n", "last_report = model.Report.all().ancestor(self.version).filter(\n 'facility_name =', self.params.facility_name).order('-timestamp').get()\n", "report = model.Report(self.version, facility_name=sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assign'", "For", "Condition", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_1(self, VAR_2):...\n", "" ]
[ "def get(self, key):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_26(VAR_30, *VAR_12, **VAR_17):...\n", "if not GLSetting.memory_copy.anomaly_checks:\n", "return VAR_20(VAR_30, *VAR_12, **kw)\n", "if GLSetting.anomalies_counter[VAR_1] > alarm_level[VAR_1]:\n", "if VAR_1 == 'new_submission':\n", "return VAR_20(VAR_30, *VAR_12, **kw)\n", "log.debug('Blocked a ...
[ "def call_handler(cls, *args, **kw):...\n", "if not GLSetting.memory_copy.anomaly_checks:\n", "return method_handler(cls, *args, **kw)\n", "if GLSetting.anomalies_counter[element] > alarm_level[element]:\n", "if element == 'new_submission':\n", "return method_handler(cls, *args, **kw)\n", "log.debug('Bl...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Condition", "Return'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_18(self, VAR_36, VAR_37=None):...\n", "VAR_37 = frappe.permissions.get_user_permission_doctypes(VAR_37, VAR_36)\n", "VAR_1 = frappe.get_meta(self.doctype)\n", "for doctypes in VAR_37:\n", "VAR_64 = {}\n", "VAR_58 = []\n", "for VAR_6 in VAR_1.get_fields_to_check_permissions(doctypes):\n", "VA...
[ "def add_user_permissions(self, user_permissions, user_permission_doctypes=None...\n", "user_permission_doctypes = frappe.permissions.get_user_permission_doctypes(\n user_permission_doctypes, user_permissions)\n", "meta = frappe.get_meta(self.doctype)\n", "for doctypes in user_permission_doctypes:\n", "m...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Assign'", "Assign'", "For", "Assign'", "Condition", "Assign'", "Expr'", "Condition", "Condition", "Expr'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "AugAssign'", "Assign'" ]
[ "def __init__(self, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9=None, VAR_10=None,...\n", "threading.Thread.__init__(self)\n", "self.username = VAR_5\n", "self.password = VAR_6\n", "self.metrics = VAR_7\n", "self.tasks = VAR_8\n", "self.log = VAR_9\n", "self.base_url = VAR_10\n", "self.submissions_path = VAR_...
[ "def __init__(self, username, password, metrics, tasks, log=None, base_url=...\n", "threading.Thread.__init__(self)\n", "self.username = username\n", "self.password = password\n", "self.metrics = metrics\n", "self.tasks = tasks\n", "self.log = log\n", "self.base_url = base_url\n", "self.submissions_...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_1():...\n", "CLASS_1().start()\n" ]
[ "def kill():...\n", "ki().start()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __init__(self, VAR_2):...\n", "self.request = VAR_2\n", "for VAR_5, VAR_6, VAR_7 in (('activities', 'activity', Activity), (\n", "self[VAR_5] = CLASS_1(self, VAR_5, VAR_6, VAR_7)\n", "self['configfiles'] = CLASS_1(self, 'configfiles', 'config_file',\n ConfigFiles, 'key')\n" ]
[ "def __init__(self, request):...\n", "self.request = request\n", "for traversal_name, object_name, factory in (('activities', 'activity',\n", "self[traversal_name] = TraversalDbAccess(self, traversal_name, object_name,\n factory)\n", "self['configfiles'] = TraversalDbAccess(self, 'configfiles', 'config_f...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Assign'", "Assign'" ]
[ "def FUNC_2(self, **VAR_6):...\n", "return self.sendstring(json.dumps(VAR_6))\n" ]
[ "def response_func(self, **kw):...\n", "return self.sendstring(json.dumps(kw))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_9(self):...\n", "VAR_20 = self.request.get('key')\n", "if VAR_20:\n", "VAR_0 = ndb.Key(urlsafe=key).get()\n", "VAR_23 = self.request.get('url', '').strip()\n", "if not VAR_0:\n", "VAR_24 = buildbot.ParseBuildUrl(VAR_23)\n", "return self.CreateError('Analysis of flake is not found', 404)\n", ...
[ "def HandleGet(self):...\n", "key = self.request.get('key')\n", "if key:\n", "analysis = ndb.Key(urlsafe=key).get()\n", "build_url = self.request.get('url', '').strip()\n", "if not analysis:\n", "build_info = buildbot.ParseBuildUrl(build_url)\n", "return self.CreateError('Analysis of flake is not foun...
[ 0, 0, 5, 0, 0, 5, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 5, 0, 0, 0, 5 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "C...
[ "def FUNC_7(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = self.bindings\n", "VAR_11 = '{app}-{stack}-v000'.format(app=self.TEST_APP, stack=bindings[\n 'TEST_STACK'])\n", "VAR_9 = self.agent.make_json_payload_from_kwargs(job=[{'cloudProvider':\n 'gce', 'application': self.TEST_APP, 'credentials': b...
[ "def create_server_group(self):...\n", "\"\"\"docstring\"\"\"\n", "bindings = self.bindings\n", "group_name = '{app}-{stack}-v000'.format(app=self.TEST_APP, stack=bindings[\n 'TEST_STACK'])\n", "payload = self.agent.make_json_payload_from_kwargs(job=[{'cloudProvider':\n 'gce', 'application': self.TEST...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "from functools import partial\n", "from anaconda_go.lib import go\n", "from anaconda_go.lib.helpers import get_working_directory\n", "from anaconda_go.lib.helpers import get_settings, active_view\n", "from anaconda_go.lib.plugin import anaconda_sublime, Worker, Callback\n", "import sublime as st3_sublime...
[ "from functools import partial\n", "from anaconda_go.lib import go\n", "from anaconda_go.lib.helpers import get_working_directory\n", "from anaconda_go.lib.helpers import get_settings, active_view\n", "from anaconda_go.lib.plugin import anaconda_sublime, Worker, Callback\n", "import sublime as st3_sublime...
[ 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Expr'", "Expr'", "FunctionDef'", "Docstring", "Condition", "Assign'", "Condition", "Return'", "Condition", "Expr'", "Assi...
[ "def __init__(self, VAR_5, VAR_4):...\n", "self.el = VAR_5\n", "self.txt = VAR_4\n" ]
[ "def __init__(self, el, txt):...\n", "self.el = el\n", "self.txt = txt\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_6():...\n", "VAR_9 = cfg.get_config()\n", "return urlparse.urlparse(VAR_9.dsn).path.lstrip('/')\n" ]
[ "def _get_test_db_name():...\n", "config = cfg.get_config()\n", "return urlparse.urlparse(config.dsn).path.lstrip('/')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_8(self, VAR_9, VAR_7=False, VAR_10=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_29 = self.output if VAR_7 else self.input\n", "if isinstance(VAR_9, str):\n", "if isinstance(VAR_9, _IOFile):\n", "if callable(VAR_9):\n", "self.dependencies[VAR_9] = VAR_9.rule\n", "VAR_44 = IOFile(VAR_9, VAR_1...
[ "def _set_inoutput_item(self, item, output=False, name=None):...\n", "\"\"\"docstring\"\"\"\n", "inoutput = self.output if output else self.input\n", "if isinstance(item, str):\n", "if isinstance(item, _IOFile):\n", "if callable(item):\n", "self.dependencies[item] = item.rule\n", "_item = IOFile(item,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "For", "Condition", "Condition", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Condition", "Expr'", "Expr'", "E...
[ "\"\"\"string\"\"\"\n", "import sqlite3\n", "import os\n", "import logging\n", "from cfenv import AppEnv\n", "import psycopg2\n", "VAR_0 = 'karmadb'\n", "VAR_1 = AppEnv()\n", "VAR_2 = logging.getLogger(__name__)\n", "VAR_3 = 'elephantsql'\n", "\"\"\"string\"\"\"\n", "if VAR_1.name == None:\n",...
[ "\"\"\"\nAll DB operations, including connection to the appropriate DB, are handled here.\n\nReleased under MIT license, copyright 2018 Tyler Ramer\n\"\"\"\n", "import sqlite3\n", "import os\n", "import logging\n", "from cfenv import AppEnv\n", "import psycopg2\n", "DB_NAME = 'karmadb'\n", "env = AppE...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "Expr'", "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Funct...
[ "import sys\n", "import logging\n", "import sqlalchemy as sa\n", "from . import filters\n", "from sqlalchemy.orm import joinedload\n", "from sqlalchemy.exc import IntegrityError\n", "from sqlalchemy import func\n", "from sqlalchemy.orm.properties import SynonymProperty\n", "from ..base import BaseIn...
[ "import sys\n", "import logging\n", "import sqlalchemy as sa\n", "from . import filters\n", "from sqlalchemy.orm import joinedload\n", "from sqlalchemy.exc import IntegrityError\n", "from sqlalchemy import func\n", "from sqlalchemy.orm.properties import SynonymProperty\n", "from ..base import BaseIn...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "For", "Condition", "Expr'", "Expr'", "Assign'", ...
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "VAR_17 = f.read().split('\\n')\n", "VAR_18 = VAR_17[4].split('=')[1].strip('\"')\n", "return VAR_18\n" ]
[ "def get_osversion():...\n", "\"\"\"docstring\"\"\"\n", "osfilecontent = f.read().split('\\n')\n", "version = osfilecontent[4].split('=')[1].strip('\"')\n", "return version\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "@detail_route(methods=['get'])...\n", "\"\"\"docstring\"\"\"\n", "get_and_check_project(VAR_9, VAR_11)\n", "VAR_28 = self.queryset.get(VAR_10=pk, VAR_1=project_pk)\n", "VAR_23 = max(0, int(VAR_9.query_params.get('line', 0)))\n", "VAR_24 = VAR_28.console_output or ''\n", "return Response('\\n'.join(VAR_...
[ "@detail_route(methods=['get'])...\n", "\"\"\"docstring\"\"\"\n", "get_and_check_project(request, project_pk)\n", "task = self.queryset.get(pk=pk, project=project_pk)\n", "line_num = max(0, int(request.query_params.get('line', 0)))\n", "output = task.console_output or ''\n", "return Response('\\n'.join(...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_7(self):...\n", "VAR_5 = [{'cloudProvider': 'gce', 'asgName': self.__server_group_name,\n 'serverGroupName': self.__server_group_name, 'region': self.TEST_REGION,\n 'zone': self.TEST_ZONE, 'type': 'enableServerGroup', 'regions': [self.\n TEST_REGION], 'zones': [self.TEST_ZONE], 'credentials': s...
[ "def enable_server_group(self):...\n", "job = [{'cloudProvider': 'gce', 'asgName': self.__server_group_name,\n 'serverGroupName': self.__server_group_name, 'region': self.TEST_REGION,\n 'zone': self.TEST_ZONE, 'type': 'enableServerGroup', 'regions': [self.\n TEST_REGION], 'zones': [self.TEST_ZONE], 'cred...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "import psycopg2\n", "from itertools import izip_longest\n", "VAR_0 = 'tournament'\n", "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "return psycopg2.connect('dbname=%s' % VAR_0)\n" ]
[ "import psycopg2\n", "from itertools import izip_longest\n", "DBNAME = 'tournament'\n", "def connect():...\n", "\"\"\"docstring\"\"\"\n", "return psycopg2.connect('dbname=%s' % DBNAME)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_2(VAR_0, VAR_2):...\n", "return os.chmod(VAR_0, VAR_2, follow_symlinks=os.chmod not in os.\n supports_follow_symlinks)\n" ]
[ "def lchmod(f, mode):...\n", "return os.chmod(f, mode, follow_symlinks=os.chmod not in os.\n supports_follow_symlinks)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __lt__(self, VAR_16):...\n", "VAR_39 = self.workflow._ruleorder.compare(self, VAR_16)\n", "return VAR_39 < 0\n" ]
[ "def __lt__(self, rule):...\n", "comp = self.workflow._ruleorder.compare(self, rule)\n", "return comp < 0\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@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_19(self, VAR_14):...\n", "" ]
[ "def is_relation_many_to_many(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_1(self):...\n", "self.assertTrue(self.client.login(username='autotest', password='password'))\n" ]
[ "def setUp(self):...\n", "self.assertTrue(self.client.login(username='autotest', password='password'))\n" ]
[ 0, 5 ]
[ "FunctionDef'", "Expr'" ]
[ "async def FUNC_1(VAR_2):...\n", "VAR_10 = await VAR_2.post()\n", "VAR_11 = CLASS_0(VAR_10['src'])\n", "VAR_12 = VAR_10.get('new_src')\n", "if VAR_12 and VAR_12 != VAR_10['src']:\n", "shutil.move(VAR_11.abspath, VAR_3.STORAGE_DIR + VAR_12)\n", "for VAR_16 in VAR_11.FORM:\n", "VAR_15 = VAR_11.backup_ab...
[ "async def save(request):...\n", "data = await request.post()\n", "item = Item(data['src'])\n", "new_src = data.get('new_src')\n", "if new_src and new_src != data['src']:\n", "shutil.move(item.abspath, settings.STORAGE_DIR + new_src)\n", "for field in item.FORM:\n", "old_backup_abspath = item.backup_a...
[ 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'", "Condition", "Return'", "Expr'" ]
[ "def FUNC_13(self, VAR_28, VAR_27=True, VAR_25=None, VAR_29=None, **VAR_18):...\n", "VAR_34 = VAR_28(VAR_29 or self.mock_nsx_clustered_api(VAR_25=\n session_response), **kwargs)\n", "if VAR_27:\n", "mock.patch.object(VAR_34, '_validate_result').start()\n", "VAR_52 = VAR_34.new_client_for\n", "def FUNC_...
[ "def new_mocked_client(self, client_class, mock_validate=True,...\n", "client = client_class(mock_cluster or self.mock_nsx_clustered_api(\n session_response=session_response), **kwargs)\n", "if mock_validate:\n", "mock.patch.object(client, '_validate_result').start()\n", "new_client_for = client.new_clie...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Expr'", "Assign'", "FunctionDef'", "Assign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_5(VAR_14, VAR_15):...\n", "VAR_31 = sup.net.RequestPerformer()\n", "VAR_31.proxy = VAR_14\n", "if VAR_15 == 'HTTP' or VAR_15 == 'HTTPS':\n", "VAR_31.proxy_type = sup.proxytype.http\n", "if VAR_15 == 'SOCKS4':\n", "VAR_31.useragent = random.choice(VAR_11.ua_list)\n", "VAR_31.proxy_type = sup....
[ "def make_net(proxy, proxytype):...\n", "net = sup.net.RequestPerformer()\n", "net.proxy = proxy\n", "if proxytype == 'HTTP' or proxytype == 'HTTPS':\n", "net.proxy_type = sup.proxytype.http\n", "if proxytype == 'SOCKS4':\n", "net.useragent = random.choice(d.ua_list)\n", "net.proxy_type = sup.proxytyp...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def __init__(self):...\n", "print('Creating TensorflowProcessor object')\n", "print('Loading ball detection tflite model')\n", "self.ball_detector_interpreter = interpreter_wrapper.Interpreter(VAR_2=\n TensorflowProcessor.ball_detector_model_path)\n", "self.ball_detector_interpreter.allocate_tensors()\n...
[ "def __init__(self):...\n", "print('Creating TensorflowProcessor object')\n", "print('Loading ball detection tflite model')\n", "self.ball_detector_interpreter = interpreter_wrapper.Interpreter(model_path\n =TensorflowProcessor.ball_detector_model_path)\n", "self.ball_detector_interpreter.allocate_tensor...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_3(VAR_2, VAR_3):...\n", "VAR_11 = urlparse.urlparse(VAR_2)\n", "VAR_12 = VAR_11._replace(VAR_7=new_database)\n", "return VAR_12.geturl()\n" ]
[ "def _replace_dsn_database(dsn, new_database):...\n", "parsed = urlparse.urlparse(dsn)\n", "replaced = parsed._replace(path=new_database)\n", "return replaced.geturl()\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.config.get(self.section, 'base_url')\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.config.get(self.section, 'base_url')\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_0(self, VAR_11=None, VAR_12=None):...\n", "\"\"\"docstring\"\"\"\n", "assert self.use_stdin and VAR_12 is not None or not self.use_stdin and VAR_11 is not None\n", "VAR_21 = self.generate_config_file()\n", "self.command = self._create_command(VAR_11=filename, VAR_21=config_file)\n", "VAR_22 = ''...
[ "def lint(self, filename=None, file=None):...\n", "\"\"\"docstring\"\"\"\n", "assert self.use_stdin and file is not None or not self.use_stdin and filename is not None\n", "config_file = self.generate_config_file()\n", "self.command = self._create_command(filename=filename, config_file=config_file)\n", "s...
[ 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {}\n", "for count in range(0, 50):\n", "if kb.dbms == 'Oracle' and VAR_0.endswith(' FROM DUAL'):\n", "return None\n", "VAR_0 = VAR_0[:-len(' FROM DUAL')]\n", "if count:\n", "VAR_0 += ', NULL'\n", "if kb.dbms == 'Oracle':\n", "...
[ "def __effectiveUnionTest(query, comment):...\n", "\"\"\"docstring\"\"\"\n", "resultDict = {}\n", "for count in range(0, 50):\n", "if kb.dbms == 'Oracle' and query.endswith(' FROM DUAL'):\n", "return None\n", "query = query[:-len(' FROM DUAL')]\n", "if count:\n", "query += ', NULL'\n", "if kb.dbms...
[ 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 2 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Condition", "Return'", "Assign'", "Condition", "AugAssign'", "Condition", "AugAssign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "For", "Condition", "Condition", "Assign'", "Condition"...
[ "def FUNC_8(self, VAR_15):...\n", "VAR_32 = 1.0\n", "VAR_33 = 'GB'\n", "if VAR_15.endswith('MB'):\n", "VAR_32 = 1.0 / 1024\n", "if VAR_15.endswith('TB'):\n", "VAR_33 = 'MB'\n", "VAR_32 = 1.0 * 1024\n", "return VAR_32 * float(VAR_15.partition(VAR_33)[0])\n", "VAR_33 = 'TB'\n" ]
[ "def _get_space_in_gb(self, val):...\n", "scale = 1.0\n", "part = 'GB'\n", "if val.endswith('MB'):\n", "scale = 1.0 / 1024\n", "if val.endswith('TB'):\n", "part = 'MB'\n", "scale = 1.0 * 1024\n", "return scale * float(val.partition(part)[0])\n", "part = 'TB'\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'" ]
[ "def FUNC_0(self, VAR_0='crimemap'):...\n", "return pymysql.connect(host='localhost', user=db_config.db_user, password=\n db_config.db_password, db=database)\n" ]
[ "def connect(self, database='crimemap'):...\n", "return pymysql.connect(host='localhost', user=db_config.db_user, password=\n db_config.db_password, db=database)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_34(self, VAR_14):...\n", "return self.list_properties[VAR_14].mapper.class_\n" ]
[ "def get_related_model(self, col_name):...\n", "return self.list_properties[col_name].mapper.class_\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "\"\"\"string\"\"\"\n", "from ast import literal_eval\n", "import os\n", "import djcelery\n", "VAR_0 = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))\n", "VAR_1 = os.environ.get('DJANGO_SECRET_KEY',\n 's#x)wcdigpbgi=7nxrbqbd&$yri@2k9bs%v@*szo#&)c=qp+3-')\n", "VAR_2 = literal_eval(os.envi...
[ "\"\"\"\nDjango settings for the GitMate project.\n\nGenerated by 'django-admin startproject' using Django 1.9.7.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/1.9/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/1.9/ref/settin...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "AugAssign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'",...
[ "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_1(self, *VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "Daemon.terminate(self, *VAR_5)\n", "if self._current_process is not None:\n", "self._current_process.terminate()\n" ]
[ "def terminate(self, *_):...\n", "\"\"\"docstring\"\"\"\n", "Daemon.terminate(self, *_)\n", "if self._current_process is not None:\n", "self._current_process.terminate()\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_6(self, VAR_11, VAR_52=None):...\n", "if VAR_52 is None and not isinstance(VAR_101.site, FakeSubreddit):\n", "VAR_52 = VAR_101.site\n", "if VAR_52:\n", "if not VAR_11:\n", "VAR_52 = None\n", "VAR_52 = Subreddit._by_name(VAR_52)\n", "VAR_101.errors.add(errors.SUBREDDIT_NOEXIST)\n", "return ...
[ "def run(self, url, sr=None):...\n", "if sr is None and not isinstance(c.site, FakeSubreddit):\n", "sr = c.site\n", "if sr:\n", "if not url:\n", "sr = None\n", "sr = Subreddit._by_name(sr)\n", "c.errors.add(errors.SUBREDDIT_NOEXIST)\n", "return self.error(errors.NO_URL)\n", "url = utils.sanitize_u...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Expr'", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Assign'", "Return'", "Return'", "Expr'", "Return'" ]