lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_39(self, VAR_16, VAR_25=None, VAR_26=True):...\n", "\"\"\"docstring\"\"\"\n", "VAR_47 = self.meta.get_field(VAR_16)\n", "if VAR_47 and VAR_47.get('__print_hide'):\n", "return True\n", "VAR_48 = 0\n", "if self.get(VAR_16) == 0 and not self.meta.istable:\n", "VAR_48 = (VAR_25 and VAR_25.print_...
[ "def is_print_hide(self, fieldname, df=None, for_print=True):...\n", "\"\"\"docstring\"\"\"\n", "meta_df = self.meta.get_field(fieldname)\n", "if meta_df and meta_df.get('__print_hide'):\n", "return True\n", "print_hide = 0\n", "if self.get(fieldname) == 0 and not self.meta.istable:\n", "print_hide = ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_20(self, VAR_14):...\n", "" ]
[ "def is_relation_one_to_one(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_6(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': 'disableServerGroup', 'regions': [self.\n TEST_REGION], 'zones': [self.TEST_ZONE], 'credentials': ...
[ "def disable_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': 'disableServerGroup', 'regions': [self.\n TEST_REGION], 'zones': [self.TEST_ZONE], 'cr...
[ 0, 0, 0, 1, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_1(self, VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "self.connection = sqlite3.connect(self.db_path)\n", "self.cursor = self.connection.cursor()\n", "if self.connection:\n", "VAR_34 = codecs.open(VAR_1[0], encoding='utf-8', mode='r')\n", "VAR_33 = VAR_34.read()\n", "self.cursor.executescript(V...
[ "def import_database(self, sqlfile):...\n", "\"\"\"docstring\"\"\"\n", "self.connection = sqlite3.connect(self.db_path)\n", "self.cursor = self.connection.cursor()\n", "if self.connection:\n", "f = codecs.open(sqlfile[0], encoding='utf-8', mode='r')\n", "sql = f.read()\n", "self.cursor.executescript(s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "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'" ]
[ "import os\n", "from flask import Flask, render_template, request, send_from_directory, redirect, url_for, flash, abort, Response\n", "from flask_login import LoginManager, login_required, login_user, logout_user\n", "from flask_mysqldb import MySQL\n", "from forms import registerForm, loginForm\n", "from...
[ "import os\n", "from flask import Flask, render_template, request, send_from_directory, redirect, url_for, flash, abort, Response\n", "from flask_login import LoginManager, login_required, login_user, logout_user\n", "from flask_mysqldb import MySQL\n", "from forms import registerForm, loginForm\n", "from...
[ 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Ass...
[ "def FUNC_18(self):...\n", "return FUNC_18.dumps(self.properties())\n" ]
[ "def json(self):...\n", "return json.dumps(self.properties())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "if not FUNC_4('pdftotext'):\n", "VAR_0.warning(\n 'GNU file was not found on the system. Switching to a weak file extension test.'\n )\n", "VAR_9 = os.popen('file ' + re.escape(VAR_2)).read()\n", "if VAR_2.lower().endswith('.pdf'):\n", "VAR_19...
[ "def is_pdf(document):...\n", "\"\"\"docstring\"\"\"\n", "if not executable_exists('pdftotext'):\n", "log.warning(\n 'GNU file was not found on the system. Switching to a weak file extension test.'\n )\n", "file_output = os.popen('file ' + re.escape(document)).read()\n", "if document.lower().endswit...
[ 0, 0, 0, 0, 0, 0, 7, 7, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Return'", "Return'", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_3 = Walker()\n", "VAR_4 = 3\n", "VAR_5 = 0\n", "VAR_3.walk(VAR_2, VAR_4, VAR_5, 'east')\n" ]
[ "def test_walker(self):...\n", "walkman = Walker()\n", "row = 3\n", "col = 0\n", "walkman.walk(board, row, col, 'east')\n" ]
[ 0, 1, 1, 0, 1 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_22(self):...\n", "return bool(self._latest_file_parse_request and self.\n _latest_file_parse_request.Done())\n" ]
[ "def DiagnosticsForCurrentFileReady(self):...\n", "return bool(self._latest_file_parse_request and self.\n _latest_file_parse_request.Done())\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_6(self):...\n", "self.login()\n", "while True:\n", "VAR_30 = random.choice(self.tasks)\n", "self.do_step(SubmitRandomRequest(self.browser, VAR_30, VAR_10=self.base_url,\n VAR_11=self.submissions_path))\n" ]
[ "def act(self):...\n", "self.login()\n", "while True:\n", "task = random.choice(self.tasks)\n", "self.do_step(SubmitRandomRequest(self.browser, task, base_url=self.base_url,\n submissions_path=self.submissions_path))\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Condition", "Assign'", "Expr'" ]
[ "def FUNC_4(VAR_18, VAR_17, VAR_19):...\n", "\"\"\"docstring\"\"\"\n", "return keyworder.get_composite_keywords(VAR_18, VAR_17, VAR_19) or {}\n" ]
[ "def extract_composite_keywords(ckw_db, fulltext, skw_spans):...\n", "\"\"\"docstring\"\"\"\n", "return keyworder.get_composite_keywords(ckw_db, fulltext, skw_spans) or {}\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_0(self, VAR_45):...\n", "\"\"\"docstring\"\"\"\n", "self.variable_manager.extra_vars = {'job_id': VAR_45}\n", "self.pbex.run()\n", "return self.pbex._tqm._stats\n" ]
[ "def run(self, job_id):...\n", "\"\"\"docstring\"\"\"\n", "self.variable_manager.extra_vars = {'job_id': job_id}\n", "self.pbex.run()\n", "return self.pbex._tqm._stats\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Return'" ]
[ "from __future__ import absolute_import\n", "from binascii import hexlify\n", "from datetime import datetime\n", "from pony import orm\n", "from pony.orm import db_session, desc, raw_sql, select\n", "from Tribler.Core.Category.FamilyFilter import default_xxx_filter\n", "from Tribler.Core.Modules.Metadat...
[ "from __future__ import absolute_import\n", "from binascii import hexlify\n", "from datetime import datetime\n", "from pony import orm\n", "from pony.orm import db_session, desc, raw_sql, select\n", "from Tribler.Core.Category.FamilyFilter import default_xxx_filter\n", "from Tribler.Core.Modules.Metadat...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", ...
[ "@db.transact...\n", "\"\"\"docstring\"\"\"\n", "VAR_14 = self.check_auth(VAR_9)\n", "VAR_22 = db.get_root()['oms_root']\n", "VAR_23, VAR_13 = traverse_path(VAR_22, VAR_9.path[1:])\n", "if not VAR_23 and VAR_13:\n", "VAR_23 = [VAR_22]\n", "VAR_12 = VAR_23[-1]\n", "VAR_24 = self.get_interaction(VAR_9...
[ "@db.transact...\n", "\"\"\"docstring\"\"\"\n", "token = self.check_auth(request)\n", "oms_root = db.get_root()['oms_root']\n", "objs, unresolved_path = traverse_path(oms_root, request.path[1:])\n", "if not objs and unresolved_path:\n", "objs = [oms_root]\n", "obj = objs[-1]\n", "interaction = self....
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "FunctionDef'", "Assign'", "Return'", "ImportFrom'", "For", "Condition", "Assign'", "Condition", ...
[ "def FUNC_34(self):...\n", "" ]
[ "def get(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_0(self):...\n", "self.mail_service = mock()\n", "self.services_factory = mock()\n", "self.services_factory.mode = UserAgentMode(is_single_user=True)\n", "self.services = mock()\n", "self.services.mail_service = self.mail_service\n", "self.services_factory._services_by_user = {'someuserid': sel...
[ "def setUp(self):...\n", "self.mail_service = mock()\n", "self.services_factory = mock()\n", "self.services_factory.mode = UserAgentMode(is_single_user=True)\n", "self.services = mock()\n", "self.services.mail_service = self.mail_service\n", "self.services_factory._services_by_user = {'someuserid': self...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_2(VAR_14, VAR_15=None, VAR_16=None, VAR_17='width=\\\\textwidth'):...\n", "if not VAR_16:\n", "VAR_16 = VAR_15[0][0]\n", "if VAR_14[0]:\n", "if VAR_14[1]:\n", "if VAR_14[1]:\n", "return self.markers[0] % (VAR_14[0][0], VAR_14[0][1], VAR_14[1][0], VAR_14[\n 1][1], VAR_16)\n", "return self....
[ "def singleImage(dims, files=None, file=None, implicitDims='width=\\\\textwidth'):...\n", "if not file:\n", "file = files[0][0]\n", "if dims[0]:\n", "if dims[1]:\n", "if dims[1]:\n", "return self.markers[0] % (dims[0][0], dims[0][1], dims[1][0], dims[1][1], file)\n", "return self.markers[1] % (dims[0]...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Condition", "Condition", "Return'", "Return'", "Return'", "Return'" ]
[ "def FUNC_2(self, VAR_39, VAR_40):...\n", "assert len(VAR_39) > 0, 'Invalid data type'\n", "assert isinstance(VAR_40, dict), 'Invalid parameter data format'\n", "if VAR_39.upper() == 'FIELD':\n", "VAR_85 = self.field_mapping[VAR_40['field']]\n", "if VAR_39.upper() == 'INTEGER':\n", "return '`{table}`.`{...
[ "def _process_parameter(self, data_type, parameter_data):...\n", "assert len(data_type) > 0, 'Invalid data type'\n", "assert isinstance(parameter_data, dict), 'Invalid parameter data format'\n", "if data_type.upper() == 'FIELD':\n", "field_data = self.field_mapping[parameter_data['field']]\n", "if data_ty...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 ]
[ "FunctionDef'", "Assert'", "Assert'", "Condition", "Assign'", "Condition", "Return'", "Return'", "Condition", "Return'" ]
[ "def FUNC_0(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.eng:\n", "self.eng.reset()\n", "self.eng, VAR_13 = sf.Engine(self.wires, VAR_12=self.hbar)\n", "self.reset()\n", "for operation in self._queue:\n", "if operation.name not in VAR_0:\n", "self.state = self.eng.run('fock', cutoff_dim=self.cu...
[ "def execute(self):...\n", "\"\"\"docstring\"\"\"\n", "if self.eng:\n", "self.eng.reset()\n", "self.eng, q = sf.Engine(self.wires, hbar=self.hbar)\n", "self.reset()\n", "for operation in self._queue:\n", "if operation.name not in operator_map:\n", "self.state = self.eng.run('fock', cutoff_dim=self.c...
[ 0, 0, 0, 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", "Expr'", "Assign'", "Expr'", "For", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Conditi...
[ "def FUNC_19(self, VAR_6, VAR_14):...\n", "self.common.extend_volume(VAR_6, VAR_14)\n" ]
[ "def extend_volume(self, volume, new_size):...\n", "self.common.extend_volume(volume, new_size)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_1(self):...\n", "\"\"\"docstring\"\"\"\n", "return len(self.edges)\n" ]
[ "def ecount(self):...\n", "\"\"\"docstring\"\"\"\n", "return len(self.edges)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "import json\n", "from django.contrib.postgres import forms, lookups\n", "from django.contrib.postgres.fields.array import ArrayField\n", "from django.core import exceptions\n", "from django.db.models import Field, TextField, Transform\n", "from django.utils.translation import gettext_lazy as _\n", "fro...
[ "import json\n", "from django.contrib.postgres import forms, lookups\n", "from django.contrib.postgres.fields.array import ArrayField\n", "from django.core import exceptions\n", "from django.db.models import Field, TextField, Transform\n", "from django.utils.translation import gettext_lazy as _\n", "fro...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Return'" ]
[ "def FUNC_5(self):...\n", "if not self._server_popen:\n", "return -1\n", "return self._server_popen.pid\n" ]
[ "def ServerPid(self):...\n", "if not self._server_popen:\n", "return -1\n", "return self._server_popen.pid\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "import hashlib\n", "from webapp.web import BaseHandler\n", "from model import dbapi\n", "def FUNC_0(self):...\n", "if self.check_xsrf_cookie() == False:\n", "VAR_0 = 'xsrf invalid'\n", "def FUNC_1(self, VAR_0=''):...\n", "self.get(VAR_0)\n", "VAR_1 = self.xsrf_from_html()\n", "VAR_2 = {'error_inf...
[ "import hashlib\n", "from webapp.web import BaseHandler\n", "from model import dbapi\n", "def check_xsrf(self):...\n", "if self.check_xsrf_cookie() == False:\n", "error = 'xsrf invalid'\n", "def get(self, error=''):...\n", "self.get(error)\n", "xsrf_token = self.xsrf_from_html()\n", "params = {'er...
[ 0, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Condition", "Assign'", "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_4(VAR_6, VAR_7=3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = list(VAR_6)\n", "VAR_26 = lambda : [VAR_0 for VAR_0 in VAR_6 if not os.path.exists(VAR_0)]\n", "VAR_27 = VAR_26()\n", "if VAR_27:\n", "logger.info('Waiting at most {} seconds for missing files.'.format(VAR_7))\n", "for _ in range(...
[ "def wait_for_files(files, latency_wait=3):...\n", "\"\"\"docstring\"\"\"\n", "files = list(files)\n", "get_missing = lambda : [f for f in files if not os.path.exists(f)]\n", "missing = get_missing()\n", "if missing:\n", "logger.info('Waiting at most {} seconds for missing files.'.format(\n latency_w...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "For", "Condition", "Return'", "Expr'" ]
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "FUNC_0()\n" ]
[ "def test_connect_to_database(self):...\n", "\"\"\"docstring\"\"\"\n", "connect()\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "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 FUNC_21(VAR_27, VAR_28, VAR_29, VAR_2):...\n", "\"\"\"docstring\"\"\"\n", "VAR_49 = len(VAR_27)\n", "if VAR_49 <= ray_constants.PICKLE_OBJECT_WARNING_SIZE:\n", "return\n", "VAR_50 = 'string'.format(VAR_29, VAR_28, VAR_49)\n", "FUNC_2(VAR_2, ray_constants.PICKLING_LARGE_OBJECT_PUSH_ERROR, VAR_50, VA...
[ "def check_oversized_pickle(pickled, name, obj_type, worker):...\n", "\"\"\"docstring\"\"\"\n", "length = len(pickled)\n", "if length <= ray_constants.PICKLE_OBJECT_WARNING_SIZE:\n", "return\n", "warning_message = (\n 'Warning: The {} {} has size {} when pickled. It will be stored in Redis, which could...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'", "Assign'", "Expr'" ]
[ "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_5(self):...\n", "VAR_14 = self.new_mocked_client(client.RESTClient, url_prefix='api/v1/')\n", "VAR_17 = VAR_14.new_client_for('switch/ports')\n", "VAR_17.get('11a2b')\n", "FUNC_1('get', VAR_17, 'https://1.2.3.4/api/v1/switch/ports/11a2b')\n" ]
[ "def test_client_for(self):...\n", "api = self.new_mocked_client(client.RESTClient, url_prefix='api/v1/')\n", "sub_api = api.new_client_for('switch/ports')\n", "sub_api.get('11a2b')\n", "assert_call('get', sub_api, 'https://1.2.3.4/api/v1/switch/ports/11a2b')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return VAR_14(VAR_4=home, VAR_5=None)\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return cls(home_path=home, bin_path=None)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_3(self, VAR_18):...\n", "if self.command in VAR_18:\n", "VAR_18[self.command](*self.args)\n", "VAR_45 = os.fork()\n", "if VAR_45 == 0:\n", "os.execv(self.full_command, self.args)\n", "self.pid = VAR_45\n" ]
[ "def execute(self, builtins):...\n", "if self.command in builtins:\n", "builtins[self.command](*self.args)\n", "pid = os.fork()\n", "if pid == 0:\n", "os.execv(self.full_command, self.args)\n", "self.pid = pid\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_4(self, VAR_3):...\n", "VAR_4 = cStringIO.StringIO()\n", "self.parser.dump(VAR_4)\n", "VAR_5 = VAR_4.getvalue()\n", "VAR_4.close()\n", "self.assertEqual(VAR_5, VAR_3.lstrip())\n" ]
[ "def representation_is(self, content):...\n", "target = cStringIO.StringIO()\n", "self.parser.dump(target)\n", "repr_ = target.getvalue()\n", "target.close()\n", "self.assertEqual(repr_, content.lstrip())\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_5(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_24 = self.getfile(VAR_21, VAR_23=False)\n", "if VAR_24 is not False:\n", "return True\n" ]
[ "def lexists(self, path):...\n", "\"\"\"docstring\"\"\"\n", "f = self.getfile(path, follow_symlinks=False)\n", "if f is not False:\n", "return True\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "def FUNC_16(self):...\n", "return False\n" ]
[ "def do_existing_paths(self):...\n", "return False\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_17(self, VAR_34):...\n", "\"\"\"docstring\"\"\"\n", "if not VAR_34:\n", "return True\n", "if self.tempfiles[VAR_34] is not None:\n", "VAR_70 = hashlib.sha256(FUNC_14(self.tempfiles[VAR_34], 'rb').read()\n ).hexdigest()\n", "return os.close(VAR_34)\n", "VAR_71 = self.cfg.get('honeypot', 'd...
[ "def close(self, fd):...\n", "\"\"\"docstring\"\"\"\n", "if not fd:\n", "return True\n", "if self.tempfiles[fd] is not None:\n", "shasum = hashlib.sha256(open(self.tempfiles[fd], 'rb').read()).hexdigest()\n", "return os.close(fd)\n", "shasumfile = self.cfg.get('honeypot', 'download_path') + '/' + shas...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_3(self):...\n", "VAR_5 = {'id': 'myid'}\n", "VAR_3 = self.client.post('/api/apps', json.dumps(VAR_5), content_type=\n 'application/json')\n", "self.assertEqual(VAR_3.status_code, 201)\n", "VAR_5 = {'id': VAR_3.data['id']}\n", "VAR_3 = self.client.post('/api/apps', json.dumps(VAR_5), content_t...
[ "def test_app_override_id(self):...\n", "body = {'id': 'myid'}\n", "response = self.client.post('/api/apps', json.dumps(body), content_type=\n 'application/json')\n", "self.assertEqual(response.status_code, 201)\n", "body = {'id': response.data['id']}\n", "response = self.client.post('/api/apps', json....
[ 0, 0, 5, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_5(VAR_3, VAR_4, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "if not FUNC_6(VAR_3, VAR_4, VAR_5):\n", "VAR_7 = \"ALTER SYSTEM SET %s TO '%s'\"\n", "return False\n", "VAR_3.execute(VAR_7 % (VAR_4, VAR_5))\n", "return True\n" ]
[ "def option_set(cursor, option, value):...\n", "\"\"\"docstring\"\"\"\n", "if not option_matches(cursor, option, value):\n", "query = \"ALTER SYSTEM SET %s TO '%s'\"\n", "return False\n", "cursor.execute(query % (option, value))\n", "return True\n" ]
[ 0, 0, 4, 0, 0, 4, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Return'", "Expr'", "Return'" ]
[ "def FUNC_7(VAR_9, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "assert VAR_9 in ['tags_key', 'tags_value']\n", "VAR_7, VAR_39 = VAR_9.split('_', 1)\n", "VAR_40 = state.get_config('nested_tags_only', 1)\n", "if VAR_40:\n", "VAR_63 = '{}.key'.format(VAR_7)\n", "VAR_65 = PROMOTED_COLS[VAR_7]\n", "VAR_64...
[ "def tags_expr(column_name, body):...\n", "\"\"\"docstring\"\"\"\n", "assert column_name in ['tags_key', 'tags_value']\n", "col, k_or_v = column_name.split('_', 1)\n", "nested_tags_only = state.get_config('nested_tags_only', 1)\n", "if nested_tags_only:\n", "key_list = '{}.key'.format(col)\n", "promot...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_1, VAR_3=None):...\n", "FUNC_0(self)\n", "self.list_columns = dict()\n", "self.list_properties = dict()\n", "self.session = VAR_3\n", "for VAR_36 in sa.orm.class_mapper(VAR_1).iterate_properties:\n", "if type(VAR_36) != SynonymProperty:\n", "for VAR_14 in VAR_1.__mapper__.colum...
[ "def __init__(self, obj, session=None):...\n", "_include_filters(self)\n", "self.list_columns = dict()\n", "self.list_properties = dict()\n", "self.session = session\n", "for prop in sa.orm.class_mapper(obj).iterate_properties:\n", "if type(prop) != SynonymProperty:\n", "for col_name in obj.__mapper__...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Condition", "For", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_27(VAR_50):...\n", "if re.compile('^(select|delete|update|drop|create)\\\\s').match(VAR_50):\n", "FUNC_26()\n", "if re.compile('\\\\s*[a-zA-z]*\\\\s*( from | group by | order by | where | join )'\n", "FUNC_26()\n" ]
[ "def _is_query(field):...\n", "if re.compile('^(select|delete|update|drop|create)\\\\s').match(field):\n", "_raise_exception()\n", "if re.compile('\\\\s*[a-zA-z]*\\\\s*( from | group by | order by | where | join )'\n", "_raise_exception()\n" ]
[ 0, 0, 0, 4, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_0(self):...\n", "if not GenericRequest.test_success(self):\n", "return False\n", "self.get_submission_info()\n", "return False\n", "return True\n" ]
[ "def test_success(self):...\n", "if not GenericRequest.test_success(self):\n", "return False\n", "self.get_submission_info()\n", "return False\n", "return True\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'", "Return'", "Return'" ]
[ "def __init__(self, VAR_32):...\n", "super(CLASS_1, self).__init__()\n", "self.signal = VAR_32\n" ]
[ "def __init__(self, sig):...\n", "super(MustExit, self).__init__()\n", "self.signal = sig\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "def FUNC_0(self, VAR_4, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "assert not VAR_4.endswith('/')\n", "assert not VAR_5.endswith('/')\n", "if '/' in VAR_5:\n", "VAR_34, VAR_5 = VAR_5.split('/', 1)\n", "if VAR_5 in self.nodes:\n", "if VAR_34 in self.nodes:\n", "return self.nodes[VAR_5]\n", "VAR_20...
[ "def add(self, src, dst):...\n", "\"\"\"docstring\"\"\"\n", "assert not src.endswith('/')\n", "assert not dst.endswith('/')\n", "if '/' in dst:\n", "name, dst = dst.split('/', 1)\n", "if dst in self.nodes:\n", "if name in self.nodes:\n", "return self.nodes[dst]\n", "vp = '{}/{}'.format(self.vpath,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assert'", "Assert'", "Condition", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'", "Return'" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "if 'network' in VAR_5 and 'domains' in VAR_5['network']:\n", "VAR_20 = dict((i['domain'], i['ip']) for i in VAR_5['network']['domains'])\n", "VAR_20 = dict()\n", "VAR_21 = dict((i['ip'], i['domain']) for i in VAR_5['network']['domains'])\n", "VAR_21 = di...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "if 'network' in report and 'domains' in report['network']:\n", "domainlookups = dict((i['domain'], i['ip']) for i in report['network'][\n 'domains'])\n", "domainlookups = dict()\n", "iplookups = dict((i['ip'], i['domain']) for i in report['network']['do...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Return'", "For", "Assign'" ]
[ "def FUNC_2(self):...\n", "VAR_6 = 'SELECT MAX(bno) FROM bookings'\n", "self.cursor.execute(VAR_6)\n", "VAR_8 = self.cursor.fetchone()\n", "return int(VAR_8[0]) + 1\n" ]
[ "def generate_bno(self):...\n", "query = 'SELECT MAX(bno) FROM bookings'\n", "self.cursor.execute(query)\n", "max_bno = self.cursor.fetchone()\n", "return int(max_bno[0]) + 1\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_32(self, VAR_15):...\n", "for file_col in self.get_file_column_list():\n", "if self.is_file(file_col):\n", "for file_col in self.get_image_column_list():\n", "if getattr(VAR_15, file_col):\n", "if self.is_image(file_col):\n", "VAR_28 = FileManager()\n", "if getattr(VAR_15, file_col):\n", "...
[ "def _delete_files(self, item):...\n", "for file_col in self.get_file_column_list():\n", "if self.is_file(file_col):\n", "for file_col in self.get_image_column_list():\n", "if getattr(item, file_col):\n", "if self.is_image(file_col):\n", "fm = FileManager()\n", "if getattr(item, file_col):\n", "fm.d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "For", "Condition", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_4(self):...\n", "if self._user_notified_about_crash or self._IsServerAlive():\n", "return\n", "self._user_notified_about_crash = True\n", "if self._server_stderr:\n", "VAR_27 = ''.join(server_stderr_file.readlines()[:-VAR_1])\n", "vimsupport.PostVimMessage(VAR_3)\n", "vimsupport.PostMultiLin...
[ "def _NotifyUserIfServerCrashed(self):...\n", "if self._user_notified_about_crash or self._IsServerAlive():\n", "return\n", "self._user_notified_about_crash = True\n", "if self._server_stderr:\n", "error_output = ''.join(server_stderr_file.readlines()[:-\n NUM_YCMD_STDERR_LINES_ON_CRASH])\n", "vimsup...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Assign'", "Expr'", "Expr'" ]
[ "async def FUNC_15(VAR_3):...\n", "VAR_19 = await VAR_1(VAR_3, VAR_4)\n", "return VAR_19\n" ]
[ "async def ret(request):...\n", "out = await func(request, base)\n", "return out\n" ]
[ 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "return True\n" ]
[ "def do_traverse(self):...\n", "\"\"\"docstring\"\"\"\n", "return True\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def __init__(self, VAR_0=None, VAR_1=None, VAR_2=None, VAR_3=None, VAR_4=None):...\n", "self.name = VAR_1\n", "self.password = VAR_2\n", "self.email = VAR_3\n", "self.country = VAR_4\n", "self.conn = VAR_0\n" ]
[ "def __init__(self, conn=None, name=None, password=None, email=None, country...\n", "self.name = name\n", "self.password = password\n", "self.email = email\n", "self.country = country\n", "self.conn = conn\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_8(self, VAR_2):...\n", "VAR_8 = []\n", "VAR_10 = False\n", "for i, ch in enumerate(VAR_2):\n", "if ch in ['\"', \"'\"]:\n", "return VAR_8\n", "VAR_10 = not VAR_10\n", "if ch == ';' and not VAR_10:\n", "VAR_8.append(i)\n", "if ch == '#' and not VAR_10:\n" ]
[ "def _find_breakpoints(self, line):...\n", "breakpoints = []\n", "in_quote = False\n", "for i, ch in enumerate(line):\n", "if ch in ['\"', \"'\"]:\n", "return breakpoints\n", "in_quote = not in_quote\n", "if ch == ';' and not in_quote:\n", "breakpoints.append(i)\n", "if ch == '#' and not in_quote:...
[ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2 ]
[ "FunctionDef'", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'", "Condition", "Expr'", "Condition" ]
[ "def FUNC_11(VAR_7, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_19 = VAR_7.hook\n", "VAR_20 = list(set(itertools.chain(*VAR_19.tljh_extra_apt_packages())))\n", "if VAR_20:\n", "VAR_1.info('Installing {} apt packages collected from plugins: {}'.format(\n len(VAR_20), ' '.join(VAR_20)))\n", "VAR_21 ...
[ "def run_plugin_actions(plugin_manager, plugins):...\n", "\"\"\"docstring\"\"\"\n", "hook = plugin_manager.hook\n", "apt_packages = list(set(itertools.chain(*hook.tljh_extra_apt_packages())))\n", "if apt_packages:\n", "logger.info('Installing {} apt packages collected from plugins: {}'.format(\n len(ap...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Assign'", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_8(VAR_10):...\n", "VAR_0 = []\n", "VAR_28 = 0\n", "VAR_11 = set()\n", "for VAR_29 in VAR_5.finditer(VAR_10):\n", "VAR_0.append(re.escape(VAR_10[VAR_28:VAR_29.start()]))\n", "VAR_0.append(re.escape(VAR_10[VAR_28:]))\n", "VAR_51 = VAR_29.group('name')\n", "VAR_0.append('$')\n", "if VAR_51 ...
[ "def regex(filepattern):...\n", "f = []\n", "last = 0\n", "wildcards = set()\n", "for match in _wildcard_regex.finditer(filepattern):\n", "f.append(re.escape(filepattern[last:match.start()]))\n", "f.append(re.escape(filepattern[last:]))\n", "wildcard = match.group('name')\n", "f.append('$')\n", "i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Expr'", "Expr'", "Assign'", "Expr'", "Condition", "Return'", "Condition", "Expr'", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_2(self):...\n", "print('TOTAL: %5d' % self.total, file=sys.stderr)\n", "print('SUCCESS: %5d' % self.success, file=sys.stderr)\n", "print('FAIL: %5d' % self.failure, file=sys.stderr)\n", "print('ERROR: %5d' % self.error, file=sys.stderr)\n", "print('UNDECIDED: ...
[ "def print_stats(self):...\n", "print('TOTAL: %5d' % self.total, file=sys.stderr)\n", "print('SUCCESS: %5d' % self.success, file=sys.stderr)\n", "print('FAIL: %5d' % self.failure, file=sys.stderr)\n", "print('ERROR: %5d' % self.error, file=sys.stderr)\n", "print('UNDECID...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "import time\n", "import sys\n", "import citest.gcp_testing as gcp\n", "import citest.json_contract as jc\n", "import citest.service_testing as st\n", "import spinnaker_testing as sk\n", "import spinnaker_testing.gate as gate\n", "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_age...
[ "import time\n", "import sys\n", "import citest.gcp_testing as gcp\n", "import citest.json_contract as jc\n", "import citest.service_testing as st\n", "import spinnaker_testing as sk\n", "import spinnaker_testing.gate as gate\n", "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return gate.new_age...
[ 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Import'", "Condition", "Docstring", "Return'" ]
[ "def FUNC_25(VAR_10):...\n", "self.events_requests.remove(VAR_9)\n" ]
[ "def on_request_finished(_):...\n", "self.events_requests.remove(request)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_16 = self.common.get_volume_stats(VAR_4)\n", "VAR_16['storage_protocol'] = 'FC'\n", "VAR_17 = self.configuration.safe_get('volume_backend_name')\n", "VAR_16['volume_backend_name'] = VAR_17 or self.__class__.__name__\n"...
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "stats = self.common.get_volume_stats(refresh)\n", "stats['storage_protocol'] = 'FC'\n", "backend_name = self.configuration.safe_get('volume_backend_name')\n", "stats['volume_backend_name'] = backend_name or self.__class__....
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_7(VAR_7, VAR_12):...\n", "VAR_9 = FUNC_6(VAR_7, 'Main')\n", "VAR_9.cmd('send-keys', VAR_12, 'Enter')\n" ]
[ "def send_main_session_command(session, cmd):...\n", "window = find_window(session, 'Main')\n", "window.cmd('send-keys', cmd, 'Enter')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_15(self, VAR_10, VAR_19, VAR_20, VAR_21, VAR_16=None):...\n", "if not VAR_16:\n", "VAR_16 = self.path[-1:][0]\n", "return VAR_0.insert('file', {'name': VAR_19, 'mime': VAR_20, 'size': VAR_21,\n 'telegram_id': VAR_10, 'directory_id': VAR_16, 'user_id': self.user_id})\n" ]
[ "def new_file(self, telegram_id, name, mime, size, directory_id=None):...\n", "if not directory_id:\n", "directory_id = self.path[-1:][0]\n", "return db.insert('file', {'name': name, 'mime': mime, 'size': size,\n 'telegram_id': telegram_id, 'directory_id': directory_id, 'user_id':\n self.user_id})\n" ]
[ 0, 0, 0, 4 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'" ]
[ "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" ]
[ "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 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_11(VAR_12):...\n", "return {'id': VAR_12.id, 'size': VAR_12.members.count(), 'collaborators':\n VAR_12.collaborator_names(VAR_7)}\n" ]
[ "def group_entry(group):...\n", "return {'id': group.id, 'size': group.members.count(), 'collaborators':\n group.collaborator_names(profile)}\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_0(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "@functools.wraps(VAR_0)...\n", "if not self.request.headers.get('X-XSRF-Token-Request'):\n", "return VAR_0(self, *VAR_5, **kwargs)\n" ]
[ "def require_xsrf_token_request(f):...\n", "\"\"\"docstring\"\"\"\n", "@functools.wraps(f)...\n", "if not self.request.headers.get('X-XSRF-Token-Request'):\n", "return f(self, *args, **kwargs)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Condition", "Return'" ]
[ "def __ne__(self, VAR_1):...\n", "return not self.__eq__(VAR_1)\n" ]
[ "def __ne__(self, other):...\n", "return not self.__eq__(other)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_9(VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "VAR_30 = []\n", "VAR_31 = []\n", "VAR_32 = CommerceConfiguration.current()\n", "VAR_33 = {'username': VAR_12.username}\n", "VAR_34 = VAR_32.is_cache_enabled\n", "VAR_35 = VAR_32.CACHE_KEY + '.' + str(VAR_12.id) if VAR_34 else None\n", "VAR_36 =...
[ "def get_user_orders(user):...\n", "\"\"\"docstring\"\"\"\n", "no_data = []\n", "user_orders = []\n", "commerce_configuration = CommerceConfiguration.current()\n", "user_query = {'username': user.username}\n", "use_cache = commerce_configuration.is_cache_enabled\n", "cache_key = commerce_configuration...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Return'", "Assign'", "Assign'", "Expr'" ]
[ "@route('GET', '/-test/veil-test.js', VAR_1=website)...\n", "get_current_http_response().set_header('Content-Type',\n 'text/javascript; charset=utf-8')\n", "return (as_path(__file__).dirname() / 'veil-test.js').text()\n" ]
[ "@route('GET', '/-test/veil-test.js', website=website)...\n", "get_current_http_response().set_header('Content-Type',\n 'text/javascript; charset=utf-8')\n", "return (as_path(__file__).dirname() / 'veil-test.js').text()\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Return'" ]
[ "def __init__(self):...\n", "tk.Tk.__init__(self)\n", "self.title('Raspi-Telxon')\n", "self.titleFont = font.Font(family='Helvetica', size=24)\n", "self.itemFont = font.Font(family='Helvetica', size=18)\n", "VAR_7 = tk.Frame(self)\n", "VAR_7.pack(side='top', fill='both', expand=True)\n", "VAR_7.grid_r...
[ "def __init__(self):...\n", "tk.Tk.__init__(self)\n", "self.title('Raspi-Telxon')\n", "self.titleFont = font.Font(family='Helvetica', size=24)\n", "self.itemFont = font.Font(family='Helvetica', size=18)\n", "container = tk.Frame(self)\n", "container.pack(side='top', fill='both', expand=True)\n", "cont...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_7():...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = 'string'\n", "VAR_16 = frappe.db.sql(VAR_11, as_dict=True)\n", "for r in VAR_16:\n", "if r.live_ebay_id == '':\n", "FUNC_5(r.item_code, '')\n", "if r.item_code:\n", "FUNC_5(r.sku, r.live_ebay_id)\n", "msgprint('The ebay item cannot be foun...
[ "def sync_ebay_ids():...\n", "\"\"\"docstring\"\"\"\n", "sql = \"\"\"\n select * from (\n SELECT t1.sku, t2.item_code, ifnull(t1.ebay_id, '') as live_ebay_id,\n ifnull(t2.ebay_id, '') as dead_ebay_id FROM `zEbayListings` t1\n LEFT JOIN `tabItem` t2 ON t1.sku = t2.item_code\n UNION...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "For", "Condition", "Expr'", "Condition", "Expr'", "Expr'" ]
[ "@VAR_2.route('/upload_file', methods=['POST', 'GET'])...\n", "if request.method == 'POST':\n", "VAR_6 = request.files['image_upload']\n", "VAR_6.save('/home/pr0phet/MyProjects/Web/static/' + VAR_6.filename)\n", "VAR_4 = (\n \"INSERT INTO imageTable(img_path, img_name)\\t\\t\\t\\tVALUES('%s', '%s')\" %\n...
[ "@app.route('/upload_file', methods=['POST', 'GET'])...\n", "if request.method == 'POST':\n", "f = request.files['image_upload']\n", "f.save('/home/pr0phet/MyProjects/Web/static/' + f.filename)\n", "query = (\n \"INSERT INTO imageTable(img_path, img_name)\\t\\t\\t\\tVALUES('%s', '%s')\" %\n ('/static/...
[ 0, 0, 4, 4, 4, 0, 0, 4 ]
[ "Condition", "Condition", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "import json\n", "import multiprocessing\n", "from leap.mail.adaptors.soledad import SoledadMailAdaptor\n", "from leap.srp_session import SRPSession\n", "from mockito import mock\n", "import os\n", "import shutil\n", "import time\n", "import uuid\n", "import random\n", "from leap.mail.imap.accou...
[ "import json\n", "import multiprocessing\n", "from leap.mail.adaptors.soledad import SoledadMailAdaptor\n", "from leap.srp_session import SRPSession\n", "from mockito import mock\n", "import os\n", "import shutil\n", "import time\n", "import uuid\n", "import random\n", "from leap.mail.imap.accou...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Import'", "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Imp...
[ "def FUNC_28(VAR_21):...\n", "if not VAR_25(VAR_21):\n", "return VAR_21, False\n", "VAR_36.release()\n", "return VAR_21, True\n" ]
[ "def handler(msg):...\n", "if not match(msg):\n", "return msg, False\n", "lock.release()\n", "return msg, True\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'", "Return'" ]
[ "def FUNC_5(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = '/api/apps'\n", "VAR_5 = {'id': 'autotest'}\n", "VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n", "self.assertEqual(VAR_3.status_code, 201)\n", "VAR_4 = VAR_3.data['id']\n", "VAR_6 = os.path.join...
[ "def test_app_release_notes_in_logs(self):...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/apps'\n", "body = {'id': 'autotest'}\n", "response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._unit_of_measurement\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self._unit_of_measurement\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_5(self, VAR_3):...\n", "if self.data:\n", "if VAR_3 != self.data[len(self.data) - 1]:\n", "self.data.append(VAR_3)\n", "self.data.append(VAR_3)\n", "if len(self.data) > self.size:\n", "self.data.pop(0)\n" ]
[ "def push(self, item):...\n", "if self.data:\n", "if item != self.data[len(self.data) - 1]:\n", "self.data.append(item)\n", "self.data.append(item)\n", "if len(self.data) > self.size:\n", "self.data.pop(0)\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Expr'", "Expr'", "Condition", "Expr'" ]
[ "def FUNC_8(self):...\n", "VAR_57 = FUNC_0(self.request, self.ctype)\n", "if not VAR_57:\n", "return FUNC_6(\"You don't have enough permission to update TestCases.\")\n", "VAR_68 = self.get_update_action()\n", "if VAR_68 is not None:\n", "return FUNC_6('Not know what to update.')\n", "VAR_104 = VAR_68...
[ "def update(self):...\n", "has_perms = check_permission(self.request, self.ctype)\n", "if not has_perms:\n", "return say_no(\"You don't have enough permission to update TestCases.\")\n", "action = self.get_update_action()\n", "if action is not None:\n", "return say_no('Not know what to update.')\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Return'", "Condition", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_11(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 5}, 'CONFIDENCE': {'MEDIUM': 5}}\n", "self.check_example('exec-as-root.py', VAR_2)\n" ]
[ "def test_exec_as_root(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 5}, 'CONFIDENCE': {'MEDIUM': 5}}\n", "self.check_example('exec-as-root.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_32(VAR_1, VAR_32):...\n", "VAR_1.__self__.__delitem__(VAR_32)\n" ]
[ "def memoize_delete(obj, item):...\n", "obj.__self__.__delitem__(item)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_6(self):...\n", "VAR_4 = 'autotest-errors'\n", "VAR_2 = '/api/apps'\n", "VAR_5 = {'id': 'camelCase'}\n", "VAR_3 = self.client.post(VAR_2, json.dumps(VAR_5), content_type=\n 'application/json')\n", "self.assertContains(VAR_3, 'App IDs can only contain [a-z0-9-]',\n status_code=400)\n", "V...
[ "def test_app_errors(self):...\n", "app_id = 'autotest-errors'\n", "url = '/api/apps'\n", "body = {'id': 'camelCase'}\n", "response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n", "self.assertContains(response, 'App IDs can only contain [a-z0-9-]',\n status_code=400...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "For", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_0(self, VAR_1, VAR_2, VAR_3, VAR_4=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_4 is None:\n", "VAR_4 = {}\n", "VAR_17 = self.pool.get('product.product').browse(VAR_1, VAR_2, VAR_3, VAR_4\n =context)\n", "VAR_18 = (VAR_17.property_stock_account_input and VAR_17.\n property_stock_accoun...
[ "def get_product_accounts(self, cr, uid, product_id, context=None):...\n", "\"\"\"docstring\"\"\"\n", "if context is None:\n", "context = {}\n", "product_obj = self.pool.get('product.product').browse(cr, uid, product_id,\n context=context)\n", "stock_input_acc = (product_obj.property_stock_account_inpu...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe.utils import getdate, add_days, today, cint\n", "from frappe import _\n", "def FUNC_0(VAR_0=None):...\n", "VAR_1 = FUNC_1()\n", "VAR_2 = FUNC_2(VAR_0)\n", "return VAR_1, VAR_2\n" ]
[ "from __future__ import unicode_literals\n", "import frappe\n", "from frappe.utils import getdate, add_days, today, cint\n", "from frappe import _\n", "def execute(filters=None):...\n", "columns = get_columns()\n", "data = get_data(filters)\n", "return columns, data\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_3(VAR_3):...\n", "VAR_3 = VAR_3.replace(\"'\", '&#39')\n", "VAR_3 = VAR_3.replace('\"', '&#34')\n", "return VAR_3\n" ]
[ "def quote_escape(string):...\n", "string = string.replace(\"'\", '&#39')\n", "string = string.replace('\"', '&#34')\n", "return string\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "import time\n", "import math\n", "from flask import request\n", "from pyMetricServer import app\n", "from pyMetricServer.system.database import database, getMetric\n", "from werkzeug.exceptions import abort\n", "from pyMetricServer.system.decorators import crossdomain\n", "from flask.json import json...
[ "import time\n", "import math\n", "from flask import request\n", "from pyMetricServer import app\n", "from pyMetricServer.system.database import database, getMetric\n", "from werkzeug.exceptions import abort\n", "from pyMetricServer.system.decorators import crossdomain\n", "from flask.json import json...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "Docstring", "Assign'", "Return'" ]
[ "@rest_utils.ajax(data_required=True)...\n", "\"\"\"docstring\"\"\"\n", "VAR_25 = VAR_1.DATA['updated']\n", "if VAR_1.DATA.get('removed'):\n", "for VAR_6 in VAR_1.DATA.get('removed'):\n", "api.nova.aggregate_set_metadata(VAR_1, VAR_7, VAR_25)\n", "VAR_25[VAR_6] = None\n" ]
[ "@rest_utils.ajax(data_required=True)...\n", "\"\"\"docstring\"\"\"\n", "updated = request.DATA['updated']\n", "if request.DATA.get('removed'):\n", "for name in request.DATA.get('removed'):\n", "api.nova.aggregate_set_metadata(request, aggregate_id, updated)\n", "updated[name] = None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Condition", "For", "Expr'", "Assign'" ]
[ "def FUNC_5(self, VAR_5):...\n", "return True\n" ]
[ "def verify_location(self, location):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_5(self, VAR_15, VAR_16=None, VAR_17=None):...\n", "\"\"\"docstring\"\"\"\n", "VAR_20 = {'description': VAR_15}\n", "if not VAR_16:\n", "VAR_16 = self.default_tag\n", "if VAR_17:\n", "VAR_23 = CLASS_0.__format_date(VAR_17)\n", "VAR_19 = self.__con.cursor()\n", "if VAR_23 == CLASS_0.INVALID_...
[ "def create_task(self, description, tag=None, due_date=None):...\n", "\"\"\"docstring\"\"\"\n", "cols = {'description': description}\n", "if not tag:\n", "tag = self.default_tag\n", "if due_date:\n", "valid_date = Database.__format_date(due_date)\n", "cur = self.__con.cursor()\n", "if valid_date == ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Condition", "Return'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "return '{0}'.format(self.name)\n" ]
[ "def select(self):...\n", "return '{0}'.format(self.name)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, VAR_23):...\n", "super(CLASS_2, self).__init__()\n", "self.has_a_single_h1 = VAR_23\n" ]
[ "def __init__(self, has_a_single_h1):...\n", "super(_AdjustTOC, self).__init__()\n", "self.has_a_single_h1 = has_a_single_h1\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'" ]
[ "def FUNC_3(self, VAR_6):...\n", "self.common = self._init_common()\n", "self._check_flags()\n", "self.iscsi_ips = {}\n", "VAR_21 = {}\n", "if len(self.configuration.hp3par_iscsi_ips) > 0:\n", "for VAR_42 in self.configuration.hp3par_iscsi_ips:\n", "if self.configuration.iscsi_ip_address not in VAR_21...
[ "def do_setup(self, context):...\n", "self.common = self._init_common()\n", "self._check_flags()\n", "self.iscsi_ips = {}\n", "temp_iscsi_ip = {}\n", "if len(self.configuration.hp3par_iscsi_ips) > 0:\n", "for ip_addr in self.configuration.hp3par_iscsi_ips:\n", "if self.configuration.iscsi_ip_address 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 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Assign'", "Condition", "For", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "For", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Expr'",...
[ "def FUNC_17(self):...\n", "" ]
[ "def builds(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_4(VAR_4):...\n", "VAR_7 = Message('Welcome to Game Change!', recipients=[user.email])\n", "VAR_7.body = render_template('emails/signup.txt', email_key=\n urlsafe_b64encode(str(hash(user.id))), VAR_8=user.first_name,\n email_address=user.email)\n", "VAR_7.html = render_template('emails/signup.h...
[ "def send_email_to_user(user):...\n", "msg = Message('Welcome to Game Change!', recipients=[user.email])\n", "msg.body = render_template('emails/signup.txt', email_key=urlsafe_b64encode\n (str(hash(user.id))), first_name=user.first_name, email_address=user.email)\n", "msg.html = render_template('emails/sig...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def __len__(self):...\n", "" ]
[ "def __len__(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_5(self, VAR_11='', VAR_6=None):...\n", "VAR_5 = self.session.query(self.obj)\n", "VAR_5 = self._get_base_query(VAR_5=query, VAR_6=filters)\n", "VAR_25 = VAR_5.all()\n", "VAR_26 = GroupByDateMonth(VAR_11, 'Group by Month')\n", "return VAR_26.apply(VAR_25)\n" ]
[ "def query_month_group(self, group_by='', filters=None):...\n", "query = self.session.query(self.obj)\n", "query = self._get_base_query(query=query, filters=filters)\n", "query_result = query.all()\n", "group = GroupByDateMonth(group_by, 'Group by Month')\n", "return group.apply(query_result)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_22(self, VAR_21, VAR_40):...\n", "\"\"\"docstring\"\"\"\n", "VAR_57 = self.getfile(VAR_21)\n", "if VAR_57 == False:\n", "VAR_57[VAR_6] = FUNC_30.S_IFMT(VAR_57[VAR_6]) | VAR_40\n" ]
[ "def chmod(self, path, perm):...\n", "\"\"\"docstring\"\"\"\n", "p = self.getfile(path)\n", "if p == False:\n", "p[A_MODE] = stat.S_IFMT(p[A_MODE]) | perm\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assign'" ]
[ "def FUNC_16(VAR_3, VAR_8, VAR_9='DUMMY_INVALID_TOKEN'):...\n", "VAR_0, VAR_10 = FUNC_0()\n", "VAR_23 = FUNC_8(VAR_10, VAR_9, VAR_3)\n", "if not VAR_23 and FUNC_13(VAR_10, VAR_3):\n", "FUNC_6(VAR_9, VAR_8)\n", "VAR_24 = list(filter(lambda x: x, VAR_8.split(',')))\n", "if len(VAR_24) > 1:\n", "if not F...
[ "def vote(poll_name, options_string, token_used='DUMMY_INVALID_TOKEN'):...\n", "conn, c = connectDB()\n", "token_valid = checkTokenValid(c, token_used, poll_name)\n", "if not token_valid and checkTokenNeeded(c, poll_name):\n", "markTokenUsedExternal(token_used, options_string)\n", "options = list(filter(l...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Condition", "For", "Expr'", "Expr'" ]
[ "import sqlite3 as sql\n", "def __init__(self, *VAR_0, **VAR_1):...\n", "self.dbStr = '../Databases/Product.db'\n", "self.table_name = 'products'\n", "self.id_column = 'id'\n", "self.column_2 = 'upc'\n", "self.column_3 = 'name'\n", "self.column_4 = 'image'\n", "self.some_upc = ''\n", "self.result ...
[ "import sqlite3 as sql\n", "def __init__(self, *args, **kwargs):...\n", "self.dbStr = '../Databases/Product.db'\n", "self.table_name = 'products'\n", "self.id_column = 'id'\n", "self.column_2 = 'upc'\n", "self.column_3 = 'name'\n", "self.column_4 = 'image'\n", "self.some_upc = ''\n", "self.result ...
[ 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0 ]
[ "Import'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_27(VAR_18):...\n", "return VAR_18[0]\n" ]
[ "def get_key(item):...\n", "return item[0]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3(self):...\n", "for VAR_5 in self.groups:\n", "self.add_group(VAR_5)\n" ]
[ "def populate_ancestors(self):...\n", "for group in self.groups:\n", "self.add_group(group)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "def FUNC_19(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_58 = self.getfile(VAR_21)\n", "if VAR_58 != False:\n", "self.mkdir(VAR_21, 0, 0, 4096, 16877)\n" ]
[ "def mkdir2(self, path):...\n", "\"\"\"docstring\"\"\"\n", "dir = self.getfile(path)\n", "if dir != False:\n", "self.mkdir(path, 0, 0, 4096, 16877)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'" ]
[ "@VAR_2.route('/temp')...\n", "return render_template('libraries/temp/index.html')\n" ]
[ "@endpoints.route('/temp')...\n", "return render_template('libraries/temp/index.html')\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]