lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "@app.route('/achievements/<achievement_id>/increment', methods=['POST'])...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = int(request.form.get('player_id'))\n", "VAR_3 = int(request.form.get('steps', 1))\n", "return flask.jsonify(FUNC_8(VAR_1, VAR_2, VAR_3))\n" ]
[ "@app.route('/achievements/<achievement_id>/increment', methods=['POST'])...\n", "\"\"\"docstring\"\"\"\n", "player_id = int(request.form.get('player_id'))\n", "steps = int(request.form.get('steps', 1))\n", "return flask.jsonify(increment_achievement(achievement_id, player_id, steps))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_5(self, VAR_16, VAR_17, VAR_19):...\n", "self.log.debug('Setting %s,%s type to %d', VAR_16, VAR_17, VAR_19)\n", "def FUNC_23(VAR_33, VAR_13, VAR_20, VAR_21, VAR_12):...\n", "if VAR_21 == wzrpc.status.success:\n", "self.log.debug('Succesfully set route type for (%s, %s) to %s', VAR_16,\n VAR_17,...
[ "def set_route_type(self, i, m, t):...\n", "self.log.debug('Setting %s,%s type to %d', i, m, t)\n", "def accept(that, reqid, seqnum, status, data):...\n", "if status == wzrpc.status.success:\n", "self.log.debug('Succesfully set route type for (%s, %s) to %s', i, m, wzrpc\n .name_route_type(t))\n", "if ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "FunctionDef'", "Condition", "Expr'", "Condition", "Return'", "Expr'", "Expr'", "Expr'", "Assign'" ]
[ "def __repr__(self):...\n", "return self.get_name()\n" ]
[ "def __repr__(self):...\n", "return self.get_name()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_9(self):...\n", "\"\"\"docstring\"\"\"\n", "frappe.db.sql('delete from tabEvent')\n", "VAR_4 = FUNC_0()\n", "VAR_5 = FUNC_0(VAR_1='2016-07-05 23:59:59')\n", "VAR_6 = FUNC_0(VAR_1='2016-07-06 00:00:00')\n", "VAR_7 = FUNC_0(VAR_1='2016-07-07 23:59:59')\n", "VAR_8 = FUNC_0(VAR_1='2016-07-08 00:...
[ "def test_between_filters(self):...\n", "\"\"\"docstring\"\"\"\n", "frappe.db.sql('delete from tabEvent')\n", "todays_event = create_event()\n", "event1 = create_event(starts_on='2016-07-05 23:59:59')\n", "event2 = create_event(starts_on='2016-07-06 00:00:00')\n", "event3 = create_event(starts_on='2016-...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def __init__(self, VAR_1=None, VAR_2=None, VAR_3=None, VAR_4=None, VAR_5=None):...\n", "self.credentials_store = VAR_2 if VAR_2 is not None else CLASS_0()\n", "self.http = VAR_3 if VAR_3 is not None else httplib2.Http()\n", "self.time = VAR_4 if VAR_4 is not None else time_module.time\n", "self.urandom = V...
[ "def __init__(self, app=None, credentials_store=None, http=None, time=None,...\n", "self.credentials_store = (credentials_store if credentials_store is not\n None else MemoryCredentials())\n", "self.http = http if http is not None else httplib2.Http()\n", "self.time = time if time is not None else time_mod...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_6(self, **VAR_6):...\n", "VAR_19 = super().get_context_data(**kwargs)\n", "return VAR_19\n" ]
[ "def get_context_data(self, **kwargs):...\n", "context = super().get_context_data(**kwargs)\n", "return context\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_9(self, VAR_1, **VAR_7):...\n", "if VAR_1 is None:\n", "VAR_1 = self._addr\n", "assert VAR_1.host == 'localhost'\n", "self._session = self.SESSION.create_client(VAR_1, **kwargs)\n" ]
[ "def _attach(self, addr, **kwargs):...\n", "if addr is None:\n", "addr = self._addr\n", "assert addr.host == 'localhost'\n", "self._session = self.SESSION.create_client(addr, **kwargs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assert'", "Assign'" ]
[ "def FUNC_2(VAR_15, VAR_2, VAR_3='text', VAR_4=bconfig....\n", "\"\"\"docstring\"\"\"\n", "VAR_43 = reader.get_cache(VAR_2)\n", "if not VAR_43:\n", "reader.set_cache(VAR_2, reader.get_regular_expressions(VAR_2, rebuild=\n rebuild_cache, VAR_7=no_cache))\n", "VAR_44 = VAR_43[0]\n", "VAR_43 = reader.ge...
[ "def get_keywords_from_text(text_lines, taxonomy_name, output_mode='text',...\n", "\"\"\"docstring\"\"\"\n", "cache = reader.get_cache(taxonomy_name)\n", "if not cache:\n", "reader.set_cache(taxonomy_name, reader.get_regular_expressions(\n taxonomy_name, rebuild=rebuild_cache, no_cache=no_cache))\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 ]
[ "Condition", "Docstring", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assi...
[ "def FUNC_0(self):...\n", "if not GenericRequest.test_success(self):\n", "return False\n", "return self.get_user_test_id() is not None\n" ]
[ "def test_success(self):...\n", "if not GenericRequest.test_success(self):\n", "return False\n", "return self.get_user_test_id() is not None\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "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_0(self):...\n", "VAR_8 = []\n", "for VAR_5 in self.groups:\n", "VAR_8.append(VAR_5.serialize())\n", "return dict(VAR_2=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, VAR_8=groups, implicit=self.implicit)\n" ]
[ "def serialize(self):...\n", "groups = []\n", "for group in self.groups:\n", "groups.append(group.serialize())\n", "return dict(name=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, groups=groups, implicit=self.implicit)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_3):...\n", "return VAR_3\n" ]
[ "def run(self, x):...\n", "return x\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_1():...\n", "return frappe.db.sql('string', as_dict=1)\n" ]
[ "def get_children():...\n", "return frappe.db.sql(\n \"\"\"select route as name,\n\t\ttitle from `tabBlog Category`\n\t\twhere published = 1\n\t\tand exists (select name from `tabBlog Post`\n\t\t\twhere `tabBlog Post`.blog_category=`tabBlog Category`.name and published=1)\n\t\torder by title asc\"\"\"\n , a...
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_24(VAR_14, VAR_23, *VAR_24):...\n", "if VAR_23 == 'on_after_task':\n", "VAR_50, VAR_51, VAR_5, VAR_52 = VAR_24\n", "self.assertEqual(self.attributes['dimensions'], VAR_14.dimensions)\n", "self.assertEqual(False, VAR_50)\n", "self.assertEqual(False, VAR_51)\n", "self.assertEqual({'os': 'Amiga',...
[ "def call_hook(botobj, name, *args):...\n", "if name == 'on_after_task':\n", "failure, internal_failure, dimensions, summary = args\n", "self.assertEqual(self.attributes['dimensions'], botobj.dimensions)\n", "self.assertEqual(False, failure)\n", "self.assertEqual(False, internal_failure)\n", "self.asser...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@utils.add_cmd...\n", "\"\"\"docstring\"\"\"\n", "permissions.checkPermissions(VAR_0, VAR_1, ['networks.remote'])\n", "VAR_2 = VAR_3.parse_args(VAR_2)\n", "VAR_5 = VAR_2.network\n", "if VAR_5 == VAR_0.name:\n", "VAR_0.error(\n 'Cannot remote-send a command to the local network; use a normal command!...
[ "@utils.add_cmd...\n", "\"\"\"docstring\"\"\"\n", "permissions.checkPermissions(irc, source, ['networks.remote'])\n", "args = remote_parser.parse_args(args)\n", "netname = args.network\n", "if netname == irc.name:\n", "irc.error(\n 'Cannot remote-send a command to the local network; use a normal comm...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 7, 7, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Return'", "Return'", "Expr'", "Assign'", "Return'", "Assign'", "FunctionDef'", "Docstring", "Assert'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'", "...
[ "def FUNC_0(self, VAR_0):...\n", "VAR_1 = VAR_0.workflow_job_nodes\n", "VAR_2 = VAR_1.prefetch_related('success_nodes', 'failure_nodes', 'always_nodes'\n ).all()\n", "for workflow_node in VAR_2:\n", "self.add_node(workflow_node)\n", "for node_type in ['success_nodes', 'failure_nodes', 'always_nodes']:\...
[ "def _init_graph(self, workflow_job):...\n", "node_qs = workflow_job.workflow_job_nodes\n", "workflow_nodes = node_qs.prefetch_related('success_nodes', 'failure_nodes',\n 'always_nodes').all()\n", "for workflow_node in workflow_nodes:\n", "self.add_node(workflow_node)\n", "for node_type in ['success_no...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Expr'", "For", "For", "Assign'", "For", "Expr'" ]
[ "def __init__(self, VAR_0=None, VAR_1=None, VAR_2=None, VAR_3=None, VAR_4=...\n", "self.object_id_seed = VAR_11\n", "self.redis_address = VAR_0\n", "self.num_cpus = VAR_1\n", "self.num_gpus = VAR_2\n", "self.resources = VAR_3\n", "self.object_store_memory = VAR_4\n", "self.redis_max_memory = VAR_5\n",...
[ "def __init__(self, redis_address=None, num_cpus=None, num_gpus=None,...\n", "self.object_id_seed = object_id_seed\n", "self.redis_address = redis_address\n", "self.num_cpus = num_cpus\n", "self.num_gpus = num_gpus\n", "self.resources = resources\n", "self.object_store_memory = object_store_memory\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 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "A...
[ "def __init__(self, VAR_7=True, VAR_8=False):...\n", "\"\"\"docstring\"\"\"\n", "super().__init__(description='ParlAI parser.', allow_abbrev=False,\n conflict_handler='resolve')\n", "self.register('type', 'bool', FUNC_0)\n", "self.register('type', 'class', FUNC_1)\n", "self.parlai_home = VAR_20.path.di...
[ "def __init__(self, add_parlai_args=True, add_model_args=False):...\n", "\"\"\"docstring\"\"\"\n", "super().__init__(description='ParlAI parser.', allow_abbrev=False,\n conflict_handler='resolve')\n", "self.register('type', 'bool', str2bool)\n", "self.register('type', 'class', str2class)\n", "self.parl...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_4():...\n", "return [VAR_9.serial for VAR_9 in FUNC_0(5)]\n" ]
[ "def list_adb_devices():...\n", "return [ad.serial for ad in get_mock_ads(5)]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_44(self):...\n", "self.compilation_ko(\"\"\"\nif true {\n elsif false {\n\n }\n}\n\"\"\")\n" ]
[ "def test_misplaced_nested_elsif(self):...\n", "self.compilation_ko(\"\"\"\nif true {\n elsif false {\n\n }\n}\n\"\"\")\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.output = VAR_69, VAR_70\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.output = paths, kwpaths\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@VAR_1.route('/', methods=['GET'])...\n", "return render_template('home.html')\n" ]
[ "@app.route('/', methods=['GET'])...\n", "return render_template('home.html')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_34(VAR_39):...\n", "self.fail()\n" ]
[ "def release(self2):...\n", "self.fail()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_11(self):...\n", "return self._latest_completion_request\n" ]
[ "def GetCurrentCompletionRequest(self):...\n", "return self._latest_completion_request\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.benchmark = VAR_74\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.benchmark = benchmark\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_1(VAR_3, VAR_4):...\n", "print('query data')\n", "VAR_8 = VAR_3.cursor()\n", "VAR_8.execute(VAR_4)\n", "VAR_9 = VAR_8.fetchall()\n", "return VAR_9\n" ]
[ "def queryDB(conn, sql_select):...\n", "print('query data')\n", "cur = conn.cursor()\n", "cur.execute(sql_select)\n", "rows = cur.fetchall()\n", "return rows\n" ]
[ 0, 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "@app.route('/api/uploads/<sid>', methods=['DELETE'])...\n", "if not utils.sid_is_valid(VAR_0):\n", "abort(400)\n", "VAR_4 = os.path.join(app.config['UPLOAD_FOLDER'], VAR_0)\n", "if os.path.isdir(VAR_4):\n", "if not app.config['TESTING']:\n", "abort(404)\n", "rmtree(VAR_4)\n", "if app.config['FIREBA...
[ "@app.route('/api/uploads/<sid>', methods=['DELETE'])...\n", "if not utils.sid_is_valid(sid):\n", "abort(400)\n", "path = os.path.join(app.config['UPLOAD_FOLDER'], sid)\n", "if os.path.isdir(path):\n", "if not app.config['TESTING']:\n", "abort(404)\n", "rmtree(path)\n", "if app.config['FIREBASE']:\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Expr'", "Assign'", "Condition", "Condition", "Expr'", "Expr'", "Condition", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_2(VAR_3):...\n", "return VAR_3 if VAR_3 and VAR_4.match(VAR_3) else None\n" ]
[ "def chkpass(x):...\n", "return x if x and pass_rx.match(x) else None\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_33(self, VAR_14):...\n", "VAR_30 = getattr(self.list_columns[VAR_14], 'default', None)\n", "if VAR_30 is not None:\n", "VAR_18 = getattr(VAR_30, 'arg', None)\n", "if VAR_18 is not None:\n", "if getattr(VAR_30, 'is_callable', False):\n", "return lambda : VAR_30.arg(None)\n", "if not getattr(V...
[ "def get_col_default(self, col_name):...\n", "default = getattr(self.list_columns[col_name], 'default', None)\n", "if default is not None:\n", "value = getattr(default, 'arg', None)\n", "if value is not None:\n", "if getattr(default, 'is_callable', False):\n", "return lambda : default.arg(None)\n", "i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_9(self):...\n", "return combine_vars(self.vars, self.get_magic_vars())\n" ]
[ "def get_vars(self):...\n", "return combine_vars(self.vars, self.get_magic_vars())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self, VAR_26=True):...\n", "self._logger.info('Will connect to events endpoint')\n", "self.reply = self.get(self.request)\n", "self.reply.readyRead.connect(self.on_read_data)\n", "self.reply.error.connect(lambda VAR_25: self.on_error(VAR_25, VAR_26=\n reschedule_on_err))\n" ]
[ "def connect(self, reschedule_on_err=True):...\n", "self._logger.info('Will connect to events endpoint')\n", "self.reply = self.get(self.request)\n", "self.reply.readyRead.connect(self.on_read_data)\n", "self.reply.error.connect(lambda error: self.on_error(error,\n reschedule_on_err=reschedule_on_err))\n...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "@VAR_0.route('/crawling')...\n", "VAR_10['crawl_start_time'] = time.time()\n", "VAR_11 = VAR_10.get('url', None)\n", "VAR_12 = shlex.split('timeout %d wget -r -A pdf %s' % (VAR_4, VAR_11))\n", "VAR_13 = subprocess.Popen(VAR_12, cwd=WGET_DATA_PATH)\n", "VAR_10['crawl_process_id'] = VAR_13.pid\n", "retur...
[ "@app.route('/crawling')...\n", "session['crawl_start_time'] = time.time()\n", "url = session.get('url', None)\n", "command = shlex.split('timeout %d wget -r -A pdf %s' % (\n MAX_CRAWLING_DURATION, url))\n", "process = subprocess.Popen(command, cwd=WGET_DATA_PATH)\n", "session['crawl_process_id'] = pro...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@classmethod...\n", "super(CLASS_0, VAR_12).prepare(VAR_15, VAR_16)\n", "ScalaPlatform.prepare_tools(VAR_16)\n" ]
[ "@classmethod...\n", "super(BaseZincCompile, cls).prepare(options, round_manager)\n", "ScalaPlatform.prepare_tools(round_manager)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Expr'" ]
[ "def FUNC_0(self):...\n", "VAR_8 = []\n", "for VAR_5 in self.groups:\n", "VAR_8.append(VAR_5.serialize())\n", "return dict(VAR_2=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, VAR_8=groups, implicit=self.implicit)\n" ]
[ "def serialize(self):...\n", "groups = []\n", "for group in self.groups:\n", "groups.append(group.serialize())\n", "return dict(name=self.name, vars=self.vars.copy(), address=self.address,\n uuid=self._uuid, groups=groups, implicit=self.implicit)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Expr'", "Return'" ]
[ "def __init__(self, VAR_61=False, VAR_62=False, VAR_63='rate_', *VAR_15, **...\n", "self.rate_user = VAR_61\n", "self.rate_ip = VAR_62\n", "self.prefix = VAR_63\n", "CLASS_0.__init__(self, *VAR_15, **kw)\n" ]
[ "def __init__(self, rate_user=False, rate_ip=False, prefix='rate_', *a, **kw):...\n", "self.rate_user = rate_user\n", "self.rate_ip = rate_ip\n", "self.prefix = prefix\n", "Validator.__init__(self, *a, **kw)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_11(self, VAR_15, VAR_16, VAR_17):...\n", "self.checked += 1\n", "self.curline = 0\n", "for VAR_25 in VAR_15:\n", "if pe.tok:\n", "VAR_25 = VAR_25.decode(locale.getpreferredencoding(False), errors='ignore')\n", "VAR_27 = VAR_25.find(VAR_14) + pe.tok.lexpos\n", "sys.stdout.write('%s: %d:0 %s\\...
[ "def parse_lines(self, fd, maxlines, fname):...\n", "self.checked += 1\n", "self.curline = 0\n", "for line in fd:\n", "if pe.tok:\n", "line = line.decode(locale.getpreferredencoding(False), errors='ignore')\n", "col = line.find(expr) + pe.tok.lexpos\n", "sys.stdout.write('%s: %d:0 %s\\n' % (fname, sel...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "AugAssign'", "Assign'", "For", "Condition", "Assign'", "Assign'", "Expr'", "AugAssign'", "Assign'", "AugAssign'", "Condition", "Expr'", "AugAssign'", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Expr'", "AugAssign'" ]
[ "def __init__(self, VAR_83, VAR_10, VAR_1, VAR_65):...\n", "self.workflow = VAR_83\n", "self.name = VAR_10\n", "self._snakefile = VAR_1\n", "self._workdir = VAR_65\n" ]
[ "def __init__(self, workflow, name, snakefile, workdir):...\n", "self.workflow = workflow\n", "self.name = name\n", "self._snakefile = snakefile\n", "self._workdir = workdir\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_5(VAR_2, VAR_5):...\n", "FUNC_4(VAR_2)\n", "VAR_6 = FUNC_6(VAR_2)\n", "VAR_45 = FUNC_7(VAR_6, VAR_5=filters)\n", "if isinstance(VAR_2[0], LearningUnitYear):\n", "return {obj.id: FUNC_9(VAR_45, VAR_5, VAR_10=obj.id) for obj in VAR_2}\n", "return {obj.id: FUNC_9(VAR_45, VAR_5, VAR_11=obj.id) for...
[ "def _find_related_formations(objects, filters):...\n", "_raise_if_incorrect_instance(objects)\n", "academic_year = _extract_common_academic_year(objects)\n", "parents_by_id = _build_parent_list_by_education_group_year_id(academic_year,\n filters=filters)\n", "if isinstance(objects[0], LearningUnitYear):...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_0(self):...\n", "return self.get_serializer_class().setup_eager_loading(Submission.objects.\n filter(Q(action__isnull=True) | Q(action__published=True), published=True))\n" ]
[ "def get_queryset(self):...\n", "return self.get_serializer_class().setup_eager_loading(Submission.objects.\n filter(Q(action__isnull=True) | Q(action__published=True), published=True))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_1(self):...\n", "self.assertTrue({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n limit_page_length=None))\n" ]
[ "def test_basic(self):...\n", "self.assertTrue({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n limit_page_length=None))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "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_14(self):...\n", "VAR_5 = None\n", "VAR_5 = tempfile.NamedTemporaryFile(delete=False)\n", "if VAR_5:\n", "VAR_5.close()\n", "os.remove(VAR_5.name)\n", "self._mox.StubOutWithMock(url_helper, 'UrlOpen')\n", "VAR_12 = 'data'\n", "url_helper.UrlOpen(mox.IgnoreArg(), method='GET').AndReturn(VAR...
[ "def testDownloadFile(self):...\n", "local_file = None\n", "local_file = tempfile.NamedTemporaryFile(delete=False)\n", "if local_file:\n", "local_file.close()\n", "os.remove(local_file.name)\n", "self._mox.StubOutWithMock(url_helper, 'UrlOpen')\n", "file_data = 'data'\n", "url_helper.UrlOpen(mox.Ign...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_14(VAR_31, VAR_17=None, VAR_32=None):...\n", "bot_management.bot_event(VAR_31=event_type, VAR_14=bot_id, external_ip=self\n .request.remote_addr, VAR_24=dimensions, VAR_25=state, VAR_9=version,\n VAR_16=quarantined, VAR_17=task_id, VAR_32=task_name, VAR_8=quarantined_msg\n )\n" ]
[ "def bot_event(event_type, task_id=None, task_name=None):...\n", "bot_management.bot_event(event_type=event_type, bot_id=bot_id, external_ip=\n self.request.remote_addr, dimensions=dimensions, state=state, version=\n version, quarantined=quarantined, task_id=task_id, task_name=task_name,\n message=quaran...
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n", "from pants.backend.python.pants_requirement import PantsRequirement\n", "from pants.backend.python.python_artifact import PythonArtifact\n", "from pants.backend.python.python_requirement import PythonRequirement\n", "fr...
[ "from __future__ import absolute_import, division, print_function, unicode_literals\n", "from pants.backend.python.pants_requirement import PantsRequirement\n", "from pants.backend.python.python_artifact import PythonArtifact\n", "from pants.backend.python.python_requirement import PythonRequirement\n", "fr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFro...
[ "def FUNC_0(self, VAR_10):...\n", "VAR_49 = b''\n", "while b'\\n' not in VAR_49 and len(VAR_49) < self.maxlen:\n", "return VAR_49.split(b'\\n', 1)[0]\n", "VAR_106 = VAR_10.recv(1024)\n", "if VAR_55.errno == errno.EAGAIN:\n", "if len(VAR_106) == 0:\n", "print('EAGAIN')\n", "VAR_49 += VAR_106\n" ]
[ "def recvline(self, sock):...\n", "buf = b''\n", "while b'\\n' not in buf and len(buf) < self.maxlen:\n", "return buf.split(b'\\n', 1)[0]\n", "data = sock.recv(1024)\n", "if err.errno == errno.EAGAIN:\n", "if len(data) == 0:\n", "print('EAGAIN')\n", "buf += data\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Condition", "Expr'", "AugAssign'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_13 = HomePageStatsDTO()\n", "VAR_13.total_projects = Project.query.count()\n", "VAR_13.mappers_online = Task.query.filter(Task.locked_by is not None).distinct(\n Task.locked_by).count()\n", "VAR_13.total_mappers = User.query.count()\n", "VAR_13.to...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "dto = HomePageStatsDTO()\n", "dto.total_projects = Project.query.count()\n", "dto.mappers_online = Task.query.filter(Task.locked_by is not None).distinct(\n Task.locked_by).count()\n", "dto.total_mappers = User.query.count()\n", "dto.total_validators ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Condition", "Condition", ...
[ "def FUNC_20():...\n", "VAR_61 = Popen(['git', 'ls-tree', '-r', '--name-only', 'HEAD'], stdout=PIPE,\n VAR_37=env)\n", "VAR_62 = VAR_61.communicate()[0]\n", "if VAR_61.returncode != 0 or not VAR_62.strip():\n", "return None\n", "return [e.strip() for e in VAR_62.splitlines() if os.path.exists(e)]\n" ]
[ "def tracked_files():...\n", "p = Popen(['git', 'ls-tree', '-r', '--name-only', 'HEAD'], stdout=PIPE, env=env\n )\n", "out = p.communicate()[0]\n", "if p.returncode != 0 or not out.strip():\n", "return None\n", "return [e.strip() for e in out.splitlines() if os.path.exists(e)]\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_7(VAR_11):...\n", "return '/%s' % '/'.join(VAR_11)\n" ]
[ "def rebuild_path(url_parts):...\n", "return '/%s' % '/'.join(url_parts)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_28(self, VAR_34):...\n", "self.context.log.debug('Calling zinc on: {} ({})'.format(VAR_34, hash_file(\n VAR_34).upper() if os.path.exists(VAR_34) else 'nonexistent'))\n" ]
[ "def log_zinc_file(self, analysis_file):...\n", "self.context.log.debug('Calling zinc on: {} ({})'.format(analysis_file, \n hash_file(analysis_file).upper() if os.path.exists(analysis_file) else\n 'nonexistent'))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_14(VAR_31, VAR_17=None, VAR_32=None):...\n", "bot_management.bot_event(VAR_31=event_type, VAR_14=bot_id, external_ip=self\n .request.remote_addr, VAR_24=dimensions, VAR_25=state, VAR_9=version,\n VAR_16=quarantined, VAR_17=task_id, VAR_32=task_name, VAR_8=quarantined_msg\n )\n" ]
[ "def bot_event(event_type, task_id=None, task_name=None):...\n", "bot_management.bot_event(event_type=event_type, bot_id=bot_id, external_ip=\n self.request.remote_addr, dimensions=dimensions, state=state, version=\n version, quarantined=quarantined, task_id=task_id, task_name=task_name,\n message=quaran...
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def __getattr__(self, VAR_8):...\n", "\"\"\"docstring\"\"\"\n", "def FUNC_9(*VAR_11):...\n", "VAR_12 = ' '.join(str(elem) for elem in VAR_11)\n", "return VAR_12\n" ]
[ "def __getattr__(self, name):...\n", "\"\"\"docstring\"\"\"\n", "def adb_call(*args):...\n", "arg_str = ' '.join(str(elem) for elem in args)\n", "return arg_str\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "FunctionDef'", "Assign'", "Return'" ]
[ "\"\"\"Set of functions for path definitions.\"\"\"\n", "import logging\n", "import os\n", "import sys\n", "VAR_0 = logging.getLogger('visbrain')\n", "__all__ = ['path_to_visbrain_data', 'get_files_in_folders', 'path_to_tmp',\n 'clean_tmp', 'get_data_url_path']\n", "def FUNC_0(VAR_1=None, VAR_2=None)...
[ "\"\"\"Set of functions for path definitions.\"\"\"\n", "import logging\n", "import os\n", "import sys\n", "logger = logging.getLogger('visbrain')\n", "__all__ = ['path_to_visbrain_data', 'get_files_in_folders', 'path_to_tmp',\n 'clean_tmp', 'get_data_url_path']\n", "def path_to_visbrain_data(file=No...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "Import'", "Import'", "Import'", "Assign'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "return True\n" ]
[ "def is_authenticated(self):...\n", "\"\"\"docstring\"\"\"\n", "return True\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_7(self):...\n", "return self.content\n" ]
[ "def read(self):...\n", "return self.content\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_31(self):...\n", "if VAR_54.flags.in_install:\n", "return\n", "if self.meta.issingle:\n", "return\n", "VAR_43 = 'varchar', 'int', 'bigint'\n", "for VAR_16, VAR_9 in iteritems(self.get_valid_dict()):\n", "VAR_25 = self.meta.get_field(VAR_16)\n", "if not VAR_25 or VAR_25.fieldtype == 'Check'...
[ "def _validate_length(self):...\n", "if frappe.flags.in_install:\n", "return\n", "if self.meta.issingle:\n", "return\n", "column_types_to_check_length = 'varchar', 'int', 'bigint'\n", "for fieldname, value in iteritems(self.get_valid_dict()):\n", "df = self.meta.get_field(fieldname)\n", "if not df o...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Assign'", "For", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_5(VAR_4, *VAR_5, **VAR_6):...\n", "" ]
[ "def dummy_handler(remote, *args, **kargs):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_0(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "if os.environ.get('OVER_HEROKU', False) is not False:\n", "VAR_30 = (\"INSERT INTO Users (repository, created_at) VALUES ('{}', now());\"\n .format(VAR_0))\n", "cursor.execute(VAR_30)\n", "conn.rollback()\n", "conn.commit()\n" ]
[ "def update_users(repository):...\n", "\"\"\"docstring\"\"\"\n", "if os.environ.get('OVER_HEROKU', False) is not False:\n", "query = (\"INSERT INTO Users (repository, created_at) VALUES ('{}', now());\"\n .format(repository))\n", "cursor.execute(query)\n", "conn.rollback()\n", "conn.commit()\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_8(VAR_13, VAR_16):...\n", "VAR_35 = subprocess.Popen([VAR_13], stdin=subprocess.PIPE, VAR_36=\n subprocess.PIPE, VAR_37=subprocess.PIPE)\n", "VAR_36, VAR_37 = VAR_35.communicate(json.dumps(VAR_16))\n", "VAR_35.wait()\n", "if VAR_35.returncode != 0:\n", "return VAR_36\n" ]
[ "def render_executable(path, config):...\n", "p = subprocess.Popen([path], stdin=subprocess.PIPE, stdout=subprocess.PIPE,\n stderr=subprocess.PIPE)\n", "stdout, stderr = p.communicate(json.dumps(config))\n", "p.wait()\n", "if p.returncode != 0:\n", "return stdout\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Condition", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "self.common.delete_volume(VAR_6)\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_46(self, VAR_14):...\n", "return self.list_properties[VAR_14].columns[0]\n" ]
[ "def get_property_first_col(self, col_name):...\n", "return self.list_properties[col_name].columns[0]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_22(self):...\n", "self.assertRaises(NotImplementedError, self.driver.local_path, '')\n" ]
[ "def test_local_path(self):...\n", "self.assertRaises(NotImplementedError, self.driver.local_path, '')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "import re\n", "import time\n", "from oslo_log import log\n", "from oslo_serialization import jsonutils\n", "import requests\n", "import six.moves.urllib.parse as urlparse\n", "from vmware_nsxlib._i18n import _\n", "from vmware_nsxlib.v3 import exceptions\n", "from vmware_nsxlib.v3 import utils\n", ...
[ "import re\n", "import time\n", "from oslo_log import log\n", "from oslo_serialization import jsonutils\n", "import requests\n", "import six.moves.urllib.parse as urlparse\n", "from vmware_nsxlib._i18n import _\n", "from vmware_nsxlib.v3 import exceptions\n", "from vmware_nsxlib.v3 import utils\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Condition", "Condition", "Return'", "Condition", "Return'", "Return'", "Condition", "Return'" ]
[ "@bot.message_handler(commands=['start'])...\n", "VAR_7 = users.find_one(VAR_1)\n", "VAR_12 = VAR_7.language\n", "VAR_13 = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True\n )\n", "VAR_13.row('Русский/English')\n", "VAR_13.row(messages[VAR_12]['top_cams'])\n", "VAR_13.row(messag...
[ "@bot.message_handler(commands=['start'])...\n", "user = users.find_one(message)\n", "current_user_lang = user.language\n", "markup = types.ReplyKeyboardMarkup(one_time_keyboard=True, resize_keyboard=True\n )\n", "markup.row('Русский/English')\n", "markup.row(messages[current_user_lang]['top_cams'])\n"...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._state\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._state\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "import pymysql\n", "import dbconfig\n", "def FUNC_0(self, VAR_0='crimemap'):...\n", "return pymysql.connect(host='localhost', user=dbconfig.db_user, passwd=\n dbconfig.db_password, db=database)\n" ]
[ "import pymysql\n", "import dbconfig\n", "def connect(self, database='crimemap'):...\n", "return pymysql.connect(host='localhost', user=dbconfig.db_user, passwd=\n dbconfig.db_password, db=database)\n" ]
[ 0, 0, 0, 0 ]
[ "Import'", "Import'", "FunctionDef'", "Return'" ]
[ "\"\"\"Unittest to exercise the code in url_helper.py.\"\"\"\n", "import logging\n", "import os\n", "import stat\n", "import StringIO\n", "import sys\n", "import tempfile\n", "import time\n", "import unittest\n", "import urllib\n", "import urllib2\n", "VAR_0 = os.path.dirname(os.path.dirname(o...
[ "\"\"\"Unittest to exercise the code in url_helper.py.\"\"\"\n", "import logging\n", "import os\n", "import stat\n", "import StringIO\n", "import sys\n", "import tempfile\n", "import time\n", "import unittest\n", "import urllib\n", "import urllib2\n", "ROOT_DIR = os.path.dirname(os.path.dirnam...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 5, 0, 0...
[ "Expr'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Assign'", "Expr'", "Import'", "Expr'", "ImportFrom'", "ImportFrom'", "Import'", "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr...
[ "from __future__ import absolute_import\n", "from __future__ import division\n", "from __future__ import print_function\n", "import atexit\n", "import json\n", "import os\n", "import logging\n", "import signal\n", "import threading\n", "import time\n", "import ray\n", "import ray.ray_constants...
[ "from __future__ import absolute_import\n", "from __future__ import division\n", "from __future__ import print_function\n", "import atexit\n", "import json\n", "import os\n", "import logging\n", "import signal\n", "import threading\n", "import time\n", "import ray\n", "import ray.ray_constants...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "Assign'", "Expr'", "FunctionDef'", "Docstring", "Assign'", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", ...
[ "def FUNC_4(VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = enterprise_customer_for_request(VAR_3)\n", "if not VAR_20:\n", "return {}\n", "VAR_21 = configuration_helpers.get_value('PLATFORM_NAME', settings.\n PLATFORM_NAME)\n", "if VAR_20.branding_configuration.logo:\n", "VAR_34 = VAR_20.brandi...
[ "def enterprise_sidebar_context(request):...\n", "\"\"\"docstring\"\"\"\n", "enterprise_customer = enterprise_customer_for_request(request)\n", "if not enterprise_customer:\n", "return {}\n", "platform_name = configuration_helpers.get_value('PLATFORM_NAME', settings.\n PLATFORM_NAME)\n", "if enterpri...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "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'", ...
[ "def FUNC_7(self):...\n", "VAR_1 = '/api/apps'\n", "VAR_2 = self.client.post(VAR_1)\n", "self.assertEqual(VAR_2.status_code, 201)\n", "VAR_3 = VAR_2.data['id']\n", "VAR_1 = '/api/apps/{app_id}/builds'.format(**locals())\n", "VAR_4 = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': json.\n d...
[ "def test_run_chaos(self):...\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/builds'.format(**locals())\n", "body = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': j...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "E...
[ "def __init__(self):...\n", "self.connect_params = dict(database=const.get_const('db-name'), user=const.\n get_const('db-user'), password=const.get_const('db-password'), host=\n const.get_const('db-host-addr'), port=const.get_const('db-host-port'))\n", "self._db = psycopg2.connect(**self.connect_params)\n...
[ "def __init__(self):...\n", "self.connect_params = dict(database=const.get_const('db-name'), user=const.\n get_const('db-user'), password=const.get_const('db-password'), host=\n const.get_const('db-host-addr'), port=const.get_const('db-host-port'))\n", "self._db = psycopg2.connect(**self.connect_params)\n...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(VAR_9, VAR_10, VAR_11=None, VAR_12=None):...\n", "\"\"\"docstring\"\"\"\n", "assert VAR_9 or VAR_12\n", "assert not VAR_12 or VAR_12 and (VAR_9 or VAR_11)\n", "VAR_9 = VAR_9 or ''\n", "if isinstance(VAR_9, (tuple, list)) and isinstance(VAR_9[1], (tuple, list)):\n", "return FUNC_4(VAR_9, VAR_...
[ "def column_expr(column_name, body, alias=None, aggregate=None):...\n", "\"\"\"docstring\"\"\"\n", "assert column_name or aggregate\n", "assert not aggregate or aggregate and (column_name or alias)\n", "column_name = column_name or ''\n", "if isinstance(column_name, (tuple, list)) and isinstance(column_na...
[ 0, 0, 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", "Assert'", "Assert'", "Assign'", "Condition", "Return'", "Condition", "Return'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign...
[ "\"\"\"string\"\"\"\n", "from hp3parclient import exceptions as hpexceptions\n", "from oslo.config import cfg\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder import utils\n", "import cinder.volume.driver\n", "from cinder.volume.drivers.san.hp ...
[ "\"\"\"\nVolume driver for HP 3PAR Storage array.\nThis driver requires 3.1.2 MU2 firmware on the 3PAR array.\n\nYou will need to install the python hp3parclient.\nsudo pip install hp3parclient\n\nSet the following in the cinder.conf file to enable the\n3PAR Fibre Channel Driver along with the required flags:\n\nvo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'", "FunctionDef'", "Return'" ]
[ "def FUNC_5(VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "return inspect.isfunction(VAR_7) or inspect.ismethod(VAR_7) or FUNC_4(VAR_7)\n" ]
[ "def is_function_or_method(obj):...\n", "\"\"\"docstring\"\"\"\n", "return inspect.isfunction(obj) or inspect.ismethod(obj) or is_cython(obj)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_12(VAR_10, VAR_11=None):...\n", "\"\"\"docstring\"\"\"\n", "for VAR_1 in oauth.remote_apps.values():\n", "FUNC_6(VAR_1)\n" ]
[ "def oauth_logout_handler(sender_app, user=None):...\n", "\"\"\"docstring\"\"\"\n", "for remote in oauth.remote_apps.values():\n", "token_delete(remote)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "For", "Expr'" ]
[ "@app.route('/achievements/<achievement_id>/reveal', methods=['POST'])...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = int(request.form.get('player_id'))\n", "return flask.jsonify(FUNC_12(VAR_1, VAR_2))\n" ]
[ "@app.route('/achievements/<achievement_id>/reveal', methods=['POST'])...\n", "\"\"\"docstring\"\"\"\n", "player_id = int(request.form.get('player_id'))\n", "return flask.jsonify(reveal_achievement(achievement_id, player_id))\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_1(self, VAR_3):...\n", "if VAR_3:\n", "VAR_14 = VAR_3[0]\n", "yield 'index', VAR_3\n", "VAR_16 = VAR_3[1:]\n", "yield VAR_14, VAR_16\n" ]
[ "def resolve_methods(self, parts):...\n", "if parts:\n", "method = parts[0]\n", "yield 'index', parts\n", "vpath = parts[1:]\n", "yield method, vpath\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def __init__(self, VAR_0, VAR_1, VAR_2, VAR_3=None, VAR_4=None, VAR_5=None,...\n", "self._options = VAR_0\n", "self.build_graph = VAR_5\n", "self.build_file_parser = VAR_6\n", "self.address_mapper = VAR_7\n", "self.run_tracker = VAR_1\n", "self._log = self.Log(VAR_1)\n", "self._target_base = VAR_4 or...
[ "def __init__(self, options, run_tracker, target_roots, requested_goals=None,...\n", "self._options = options\n", "self.build_graph = build_graph\n", "self.build_file_parser = build_file_parser\n", "self.address_mapper = address_mapper\n", "self.run_tracker = run_tracker\n", "self._log = self.Log(run_tr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'" ]
[ "def FUNC_5(VAR_7, VAR_8):...\n", "if VAR_8 == VAR_1:\n", "VAR_28 = '-m32'\n", "VAR_28 = ''\n", "VAR_15 = subprocess.Popen(shlex.split('gcc {} -E -'.format(VAR_28)), stdin=\n subprocess.PIPE, VAR_16=subprocess.PIPE)\n", "VAR_15.stdin.write(b'#include <sys/syscall.h>\\nSYS_%s' % VAR_7.encode())\n", "V...
[ "def get_syscall_number(syscall_name, bitness):...\n", "if bitness == BITNESS_32:\n", "cflags = '-m32'\n", "cflags = ''\n", "gcc_process = subprocess.Popen(shlex.split('gcc {} -E -'.format(cflags)),\n stdin=subprocess.PIPE, stdout=subprocess.PIPE)\n", "gcc_process.stdin.write(b'#include <sys/syscall.h>...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "@VAR_0.route('/saml2-acs', methods=['POST'])...\n", "\"\"\"docstring\"\"\"\n", "if 'SAMLResponse' not in request.form:\n", "abort(400)\n", "VAR_10 = request.form['SAMLResponse']\n", "VAR_11 = get_authn_response(current_app.config, VAR_3, VAR_10)\n", "current_app.logger.debug('Trying to locate the user ...
[ "@authn_views.route('/saml2-acs', methods=['POST'])...\n", "\"\"\"docstring\"\"\"\n", "if 'SAMLResponse' not in request.form:\n", "abort(400)\n", "xmlstr = request.form['SAMLResponse']\n", "session_info = get_authn_response(current_app.config, session, xmlstr)\n", "current_app.logger.debug('Trying to lo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "For", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_21(self):...\n", "VAR_20 = [path for path in self.app.config['NO_AUTHN_URLS']]\n", "VAR_21 = '/test3'\n", "no_authn_views(self.app, [VAR_21])\n", "self.assertEqual(VAR_20 + ['^{!s}$'.format(VAR_21)], self.app.config[\n 'NO_AUTHN_URLS'])\n", "VAR_25 = c.get('/test3')\n", "self.assertEqual(VA...
[ "def test_no_authn_util(self):...\n", "no_authn_urls_before = [path for path in self.app.config['NO_AUTHN_URLS']]\n", "no_authn_path = '/test3'\n", "no_authn_views(self.app, [no_authn_path])\n", "self.assertEqual(no_authn_urls_before + ['^{!s}$'.format(no_authn_path)],\n self.app.config['NO_AUTHN_URLS'])...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "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_22(self):...\n", "\"\"\"docstring\"\"\"\n", "if not self.config['master'] and not self.config['cluster']:\n", "VAR_1 = \"\"\"Could not determine a cluster type and no list of nodes or master node was provided.\nAborting...\"\"\"\n", "VAR_26 = self.get_nodes_from_cluster()\n", "self.log_debug('Er...
[ "def get_nodes(self):...\n", "\"\"\"docstring\"\"\"\n", "if not self.config['master'] and not self.config['cluster']:\n", "msg = \"\"\"Could not determine a cluster type and no list of nodes or master node was provided.\nAborting...\"\"\"\n", "nodes = self.get_nodes_from_cluster()\n", "self.log_debug('Err...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "For", "Condition", "For", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Condition", "For", "Condition", "For", "Assign'", "Assign'", "Expr'", "F...
[ "def FUNC_2(VAR_3):...\n", "VAR_2 = []\n", "from opennode.oms.security.authentication import Sudo\n", "while VAR_3:\n", "assert VAR_3.__name__ is not None, '%s.__name__ is None' % VAR_3\n", "return '/'.join(VAR_2)\n", "VAR_3 = follow_symlinks(VAR_3)\n", "VAR_2.insert(0, VAR_3.__name__)\n", "VAR_3 = ...
[ "def canonical_path(item):...\n", "path = []\n", "from opennode.oms.security.authentication import Sudo\n", "while item:\n", "assert item.__name__ is not None, '%s.__name__ is None' % item\n", "return '/'.join(path)\n", "item = follow_symlinks(item)\n", "path.insert(0, item.__name__)\n", "item = ite...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "ImportFrom'", "Condition", "Assert'", "Return'", "Assign'", "Expr'", "Assign'" ]
[ "def FUNC_9(self, *VAR_15, **VAR_75):...\n", "" ]
[ "def newfn(self, *a, **env):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@wraps(VAR_55)...\n", "VAR_70['timer'] = CLASS_2(VAR_25)\n", "return VAR_55(*VAR_69, **kwargs)\n" ]
[ "@wraps(func)...\n", "kwargs['timer'] = Timer(name)\n", "return func(*args, **kwargs)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_2(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_31 = users.get_current_user()\n", "return model.Identity(model.IDENTITY_USER, VAR_31.email()) if VAR_31 else None\n" ]
[ "def gae_cookie_authentication(_request):...\n", "\"\"\"docstring\"\"\"\n", "user = users.get_current_user()\n", "return model.Identity(model.IDENTITY_USER, user.email()) if user else None\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_8():...\n", "VAR_29 = VAR_11.read(VAR_8)\n", "VAR_6.set_result(VAR_29)\n" ]
[ "def retrieve_data_async():...\n", "block = file_stream.read(file_block_size)\n", "future.set_result(block)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_17(self, VAR_6):...\n", "if VAR_6['host'] != 'localhost' and not self.run_on_localhost(VAR_6):\n", "self.logger.debug(\"Stopping remote component '%s' on host '%s'\" % (VAR_6[\n 'name'], VAR_6['host']))\n", "VAR_9 = FUNC_6(self.session, VAR_6['name'])\n", "self.stop_remote_component(VAR_6['name...
[ "def stop_component(self, comp):...\n", "if comp['host'] != 'localhost' and not self.run_on_localhost(comp):\n", "self.logger.debug(\"Stopping remote component '%s' on host '%s'\" % (comp[\n 'name'], comp['host']))\n", "window = find_window(self.session, comp['name'])\n", "self.stop_remote_component(comp...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._products\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._products\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_0(self, VAR_11):...\n", "" ]
[ "def add_tag_by_name(self, tagname):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_32(self, **VAR_50):...\n", "VAR_69, VAR_73 = self.get('/tags', VAR_50)\n", "return VAR_69\n" ]
[ "def get_tags(self, **kwargs):...\n", "res, req = self.get('/tags', kwargs)\n", "return res\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_25(VAR_32, VAR_34=0):...\n", "\"\"\"docstring\"\"\"\n", "VAR_67 = list(VAR_32.items())\n", "VAR_67.sort(FUNC_23)\n", "return VAR_34 and VAR_67[:VAR_34] or VAR_67\n" ]
[ "def _sort_kw_matches(skw_matches, limit=0):...\n", "\"\"\"docstring\"\"\"\n", "sorted_keywords = list(skw_matches.items())\n", "sorted_keywords.sort(_skw_matches_comparator)\n", "return limit and sorted_keywords[:limit] or sorted_keywords\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_33(self, VAR_9, VAR_7):...\n", "if VAR_9 == -1:\n", "return 'sosreport process received SIGKILL on node'\n", "if VAR_9 == 1:\n", "if 'sudo' in VAR_7:\n", "if VAR_9 == 127:\n", "return 'sudo attempt failed'\n", "return 'sosreport terminated unexpectedly. Check disk space'\n", "if len(VAR_7)...
[ "def determine_sos_error(self, rc, stdout):...\n", "if rc == -1:\n", "return 'sosreport process received SIGKILL on node'\n", "if rc == 1:\n", "if 'sudo' in stdout:\n", "if rc == 127:\n", "return 'sudo attempt failed'\n", "return 'sosreport terminated unexpectedly. Check disk space'\n", "if len(stdo...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Condition", "Condition", "Condition", "Return'", "Return'", "Condition", "Return'", "Return'" ]
[ "def FUNC_0(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'" ]
[ "import os\n", "import re\n", "import shutil\n", "from subprocess import check_call, CalledProcessError, DEVNULL\n", "import tempfile\n", "from coalib.bears.Bear import Bear\n", "from coalib.misc.Decorators import enforce_signature\n", "from coalib.misc.Shell import escape_path_argument, run_shell_com...
[ "import os\n", "import re\n", "import shutil\n", "from subprocess import check_call, CalledProcessError, DEVNULL\n", "import tempfile\n", "from coalib.bears.Bear import Bear\n", "from coalib.misc.Decorators import enforce_signature\n", "from coalib.misc.Shell import escape_path_argument, run_shell_com...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Ass...
[ "@utils.synchronized('3par', external=True)...\n", "\"\"\"docstring\"\"\"\n", "self.common.client_login()\n", "VAR_25 = self._create_host(VAR_7, VAR_10)\n", "VAR_26 = self.common.create_vlun(VAR_7, VAR_25)\n", "self.common.client_logout()\n", "VAR_27 = self._get_iscsi_ip(VAR_25['name'])\n", "VAR_28 = ...
[ "@utils.synchronized('3par', external=True)...\n", "\"\"\"docstring\"\"\"\n", "self.common.client_login()\n", "host = self._create_host(volume, connector)\n", "vlun = self.common.create_vlun(volume, host)\n", "self.common.client_logout()\n", "iscsi_ip = self._get_iscsi_ip(host['name'])\n", "iscsi_ip_p...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(self, VAR_2, VAR_3, VAR_4, VAR_12, VAR_13, VAR_7=None):...\n", "VAR_34 = {}.fromkeys(VAR_4, 0.0)\n", "VAR_37 = {}\n", "if not VAR_4:\n", "return VAR_34\n", "VAR_38 = self.search(VAR_2, VAR_3, [('parent_id', 'child_of', VAR_4)])\n", "if VAR_38:\n", "VAR_2.execute('string', (tuple(VAR_38),))...
[ "def _progress_rate(self, cr, uid, ids, names, arg, context=None):...\n", "res = {}.fromkeys(ids, 0.0)\n", "progress = {}\n", "if not ids:\n", "return res\n", "ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)])\n", "if ids2:\n", "cr.execute(\n \"\"\"SELECT\n project_id...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Expr'", "For", "Assign'", "Assign'", "Return'", "Assign'", "Condition", "Assign'", "Assign'", "AugAssign'", "For", "AugAssign'" ]
[ "def FUNC_19(VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_34 = {(VAR_5['dev_type'], VAR_5['device'])}\n", "for holder in VAR_5['holders']:\n", "VAR_34.update(FUNC_19(holder))\n", "return VAR_34\n" ]
[ "def get_holder_types(tree):...\n", "\"\"\"docstring\"\"\"\n", "types = {(tree['dev_type'], tree['device'])}\n", "for holder in tree['holders']:\n", "types.update(get_holder_types(holder))\n", "return types\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Expr'", "Return'" ]
[ "@handler.unsupported_on_local_server...\n", "\"\"\"docstring\"\"\"\n", "auth.revoke_session_cookie(auth.get_session_cookie())\n", "logs.log_error('Failed to revoke session cookie.')\n", "self.response.delete_cookie('session')\n", "self.redirect(self.request.get('dest'))\n" ]
[ "@handler.unsupported_on_local_server...\n", "\"\"\"docstring\"\"\"\n", "auth.revoke_session_cookie(auth.get_session_cookie())\n", "logs.log_error('Failed to revoke session cookie.')\n", "self.response.delete_cookie('session')\n", "self.redirect(self.request.get('dest'))\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Expr'", "Expr'", "Expr'" ]