lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_6():...\n", "VAR_0.info('Combining coverage results.')\n", "FUNC_4([sys.executable, '-m', 'coverage', 'combine'])\n" ]
[ "def combine_coverage():...\n", "logger.info('Combining coverage results.')\n", "sh([sys.executable, '-m', 'coverage', 'combine'])\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "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_2(self):...\n", "\"\"\"docstring\"\"\"\n", "while True:\n", "time.sleep(1)\n", "self.flush_profile_data()\n" ]
[ "def _periodically_flush_profile_events(self):...\n", "\"\"\"docstring\"\"\"\n", "while True:\n", "time.sleep(1)\n", "self.flush_profile_data()\n" ]
[ 0, 0, 6, 6, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_6(self, VAR_23):...\n", "VAR_82 = CLASS_46.run(self, VAR_23)\n", "if not VAR_82 or not hasattr(VAR_82, 'email') or not VAR_82.email:\n", "return self.error(errors.NO_EMAIL_FOR_USER)\n", "return VAR_82\n" ]
[ "def run(self, name):...\n", "user = VExistingUname.run(self, name)\n", "if not user or not hasattr(user, 'email') or not user.email:\n", "return self.error(errors.NO_EMAIL_FOR_USER)\n", "return user\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_1(VAR_0, VAR_1):...\n", "return os.utime(VAR_0, VAR_1, follow_symlinks=os.utime not in os.\n supports_follow_symlinks)\n" ]
[ "def lutime(f, times):...\n", "return os.utime(f, times, follow_symlinks=os.utime not in os.\n supports_follow_symlinks)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __lt__(self, VAR_16):...\n", "VAR_39 = self.workflow._ruleorder.compare(self, VAR_16)\n", "return VAR_39 < 0\n" ]
[ "def __lt__(self, rule):...\n", "comp = self.workflow._ruleorder.compare(self, rule)\n", "return comp < 0\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1, VAR_2, VAR_3):...\n", "VAR_20 = VAR_0[VAR_0.matched_id.isin(VAR_2)]\n", "VAR_21, VAR_7 = VAR_1(VAR_0)\n", "VAR_22, VAR_23 = VAR_1(VAR_20, VAR_7)\n", "VAR_6 = []\n", "logger.info(VAR_3)\n", "logger.info(VAR_22)\n", "logger.info(len(VAR_0.matched_id.unique()))\n", "for bin_in...
[ "def get_histogram_bar_chart_data(data, distribution_function, shared_ids,...\n", "intersection_data = data[data.matched_id.isin(shared_ids)]\n", "distribution, groups = distribution_function(data)\n", "distribution_intersection, _ = distribution_function(intersection_data, groups)\n", "bins = []\n", "log...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "For", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_6(self, VAR_72):...\n", "VAR_92 = set(self.separator.findall(VAR_72) if VAR_72 else [])\n", "VAR_93 = set(VAR_17 for VAR_17 in VAR_92 if not self.email_re.match(VAR_17))\n", "VAR_92 = VAR_92 - VAR_93\n", "if self.num > 0 and len(VAR_92) + len(VAR_93) > self.num:\n", "if self.num == 1:\n", "if ...
[ "def run(self, emails0):...\n", "emails = set(self.separator.findall(emails0) if emails0 else [])\n", "failures = set(e for e in emails if not self.email_re.match(e))\n", "emails = emails - failures\n", "if self.num > 0 and len(emails) + len(failures) > self.num:\n", "if self.num == 1:\n", "if failures:...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Expr'", "Expr'", "Expr'", "Condition", "Expr'", "Return'" ]
[ "def __getattr__(self, VAR_8):...\n", "def FUNC_5(*VAR_17):...\n", "VAR_18 = VAR_8.replace('_', '-')\n", "VAR_9 = ' '.join(str(elem) for elem in VAR_17)\n", "return self._exec_adb_cmd(VAR_18, VAR_9)\n" ]
[ "def __getattr__(self, name):...\n", "def adb_call(*args):...\n", "clean_name = name.replace('_', '-')\n", "arg_str = ' '.join(str(elem) for elem in args)\n", "return self._exec_adb_cmd(clean_name, arg_str)\n" ]
[ 0, 0, 0, 2, 2 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_2(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = 'katotestlb' + self.test_id\n", "self.__use_lb_name = VAR_4\n", "VAR_2 = self.bindings\n", "VAR_5 = VAR_2['TEST_AWS_REGION']\n", "VAR_6 = [VAR_5 + 'a', VAR_5 + 'b']\n", "VAR_7 = {'Listener': {'InstancePort': 7001, 'LoadBalancerPort': 80}}\n...
[ "def upsert_load_balancer(self):...\n", "\"\"\"docstring\"\"\"\n", "detail_raw_name = 'katotestlb' + self.test_id\n", "self.__use_lb_name = detail_raw_name\n", "bindings = self.bindings\n", "region = bindings['TEST_AWS_REGION']\n", "avail_zones = [region + 'a', region + 'b']\n", "listener = {'Listener...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_7():...\n", "" ]
[ "def genOR():...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_33(self, VAR_20):...\n", "" ]
[ "def get_userqueue(self, domain):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_1(VAR_0):...\n", "\"\"\"docstring\"\"\"\n", "if ':' not in VAR_0:\n", "VAR_4 = VAR_0.split(':')\n", "VAR_5 = importlib.import_module(VAR_4[0])\n", "return getattr(VAR_5, VAR_4[1])\n" ]
[ "def str2class(value):...\n", "\"\"\"docstring\"\"\"\n", "if ':' not in value:\n", "name = value.split(':')\n", "module = importlib.import_module(name[0])\n", "return getattr(module, name[1])\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_46(self, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "VAR_56 = self.regex.search(VAR_16)\n", "if VAR_56 is not None:\n", "return VAR_56.group('value')\n" ]
[ "def is_periodic(self, value):...\n", "\"\"\"docstring\"\"\"\n", "m = self.regex.search(value)\n", "if m is not None:\n", "return m.group('value')\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Return'" ]
[ "def FUNC_1(self, VAR_1, VAR_2, VAR_5, VAR_6, VAR_4={}):...\n", "\"\"\"docstring\"\"\"\n", "VAR_22 = self.pool.get('stock.location')\n", "VAR_23 = self.pool.get('account.move')\n", "VAR_24 = self.pool.get('account.move.line')\n", "VAR_25 = VAR_6.get('new_price', 0.0)\n", "VAR_19 = VAR_6.get('stock_outpu...
[ "def do_change_standard_price(self, cr, uid, ids, datas, context={}):...\n", "\"\"\"docstring\"\"\"\n", "location_obj = self.pool.get('stock.location')\n", "move_obj = self.pool.get('account.move')\n", "move_line_obj = self.pool.get('account.move.line')\n", "new_price = datas.get('new_price', 0.0)\n", "...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "For", "For", "Return'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Condit...
[ "def FUNC_0(VAR_1, VAR_2, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = VAR_3.key().name()\n", "return VAR_0[VAR_3.type].make_input(VAR_1, VAR_6, getattr(VAR_2, VAR_6,\n None), VAR_3)\n" ]
[ "def make_input(version, report, attribute):...\n", "\"\"\"docstring\"\"\"\n", "name = attribute.key().name()\n", "return ATTRIBUTE_TYPES[attribute.type].make_input(version, name, getattr(\n report, name, None), attribute)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_17(self, VAR_19, VAR_18, VAR_20):...\n", "return None\n" ]
[ "def get_parameters(self, key, levelctx, pathctxlist):...\n", "return None\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_16(VAR_18, VAR_19):...\n", "VAR_25 = VAR_18.options_scope\n", "return VAR_18.tool_classpath_from_products(self._products, VAR_19, VAR_25=scope\n )\n" ]
[ "def cp(instance, toolname):...\n", "scope = instance.options_scope\n", "return instance.tool_classpath_from_products(self._products, toolname,\n scope=scope)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_28(self, VAR_9=None):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_9 is None:\n", "VAR_9 = self._saml_req_dict_from_request()\n", "VAR_11 = OneLogin_Saml2_Auth(VAR_9, self.saml_config)\n", "return VAR_11\n" ]
[ "def _saml_auth(self, req_dict=None):...\n", "\"\"\"docstring\"\"\"\n", "if req_dict is None:\n", "req_dict = self._saml_req_dict_from_request()\n", "auth = OneLogin_Saml2_Auth(req_dict, self.saml_config)\n", "return auth\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Return'" ]
[ "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_6, VAR_5):...\n", "import zlib\n", "VAR_59 = VAR_6.rsplit('/', 1)[1]\n", "VAR_59 = VAR_6\n", "return 'preview-' + str(zlib.crc32(VAR_59.encode('utf-8'), 65535)\n ) + '.' + VAR_5\n" ]
[ "def preview_file_old(filename, extension):...\n", "import zlib\n", "split_path = filename.rsplit('/', 1)[1]\n", "split_path = filename\n", "return 'preview-' + str(zlib.crc32(split_path.encode('utf-8'), 65535)\n ) + '.' + extension\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Import'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_4(VAR_1):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1.value = beamr.interpreters.Config(VAR_1.value)\n", "return VAR_1\n" ]
[ "def t_YAML(t):...\n", "\"\"\"docstring\"\"\"\n", "t.value = beamr.interpreters.Config(t.value)\n", "return t\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_47(self, VAR_14):...\n", "return list(self.list_properties[VAR_14].local_columns)[0]\n" ]
[ "def get_relation_fk(self, col_name):...\n", "return list(self.list_properties[col_name].local_columns)[0]\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_7(self, VAR_5, **VAR_6):...\n", "self.render('app.html', VAR_2={})\n" ]
[ "def write_error(self, error, **kargs):...\n", "self.render('app.html', page_json={})\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_4(VAR_2, VAR_3=None, VAR_4=None, VAR_5=0, VAR_6=20, VAR_7=None):...\n", "VAR_11 = []\n", "if VAR_4:\n", "if VAR_4.blogger:\n", "if VAR_3:\n", "VAR_11.append('t1.blogger=\"%s\"' % frappe.db.escape(VAR_4.blogger))\n", "if VAR_4.blog_category:\n", "VAR_11.append('(t1.content like \"%{0}%\" or t...
[ "def get_blog_list(doctype, txt=None, filters=None, limit_start=0,...\n", "conditions = []\n", "if filters:\n", "if filters.blogger:\n", "if txt:\n", "conditions.append('t1.blogger=\"%s\"' % frappe.db.escape(filters.blogger))\n", "if filters.blog_category:\n", "conditions.append('(t1.content like \"%{...
[ 0, 0, 0, 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'", "Condition", "Condition", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Assign'...
[ "from django.shortcuts import render\n", "from django.db import transaction\n", "from django.core import serializers\n", "from django.http import HttpResponse\n", "from sio.models import *\n", "from sio.forms import *\n", "def FUNC_0(VAR_0, VAR_1=[], VAR_2=CreateStudentForm(), VAR_3=...\n", "VAR_5 = {...
[ "from django.shortcuts import render\n", "from django.db import transaction\n", "from django.core import serializers\n", "from django.http import HttpResponse\n", "from sio.models import *\n", "from sio.forms import *\n", "def make_view(request, messages=[], create_student_form=CreateStudentForm(),...\n...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Condition", "Assign'", "Return'" ]
[ "from flaskext.mysql import MySQL\n", "from werkzeug.security import generate_password_hash, check_password_hash\n", "def FUNC_0(VAR_0, VAR_1, VAR_2):...\n", "VAR_3 = VAR_2.connect()\n", "VAR_4 = VAR_3.cursor()\n", "VAR_5 = \"SELECT userEmail, password FROM Users WHERE userEmail = '{0}'\".format(\n VAR...
[ "from flaskext.mysql import MySQL\n", "from werkzeug.security import generate_password_hash, check_password_hash\n", "def validateCredentials(username, password, sqlInstance):...\n", "conn = sqlInstance.connect()\n", "cursor = conn.cursor()\n", "getUsernameAndPassword = (\n \"SELECT userEmail, password...
[ 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_33(self):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_54.flags.in_install:\n", "return\n", "for VAR_16, VAR_9 in self.get_valid_dict().items():\n", "if not VAR_9 or not isinstance(VAR_9, string_types):\n", "VAR_9 = VAR_54.as_unicode(VAR_9)\n", "if u'<' not in VAR_9 and u'>' not in VAR_9:\n", ...
[ "def _sanitize_content(self):...\n", "\"\"\"docstring\"\"\"\n", "if frappe.flags.in_install:\n", "return\n", "for fieldname, value in self.get_valid_dict().items():\n", "if not value or not isinstance(value, string_types):\n", "value = frappe.as_unicode(value)\n", "if u'<' not in value and u'>' not in...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "For", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Assign'" ]
[ "def FUNC_20(self, VAR_2, VAR_3, VAR_29=None, VAR_30='form', VAR_7=None,...\n", "VAR_42 = self.pool.get('res.users').browse(VAR_2, VAR_3, VAR_3, VAR_7\n ).company_id.project_time_mode or False\n", "VAR_43 = self.pool.get('res.company').fields_get(VAR_2, VAR_3, [\n 'project_time_mode'], VAR_7)\n", "VAR_4...
[ "def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=...\n", "tm = self.pool.get('res.users').browse(cr, uid, uid, context\n ).company_id.project_time_mode or False\n", "f = self.pool.get('res.company').fields_get(cr, uid, ['project_time_mode'],\n context)\n", "word = 'Hours'\n", ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "For", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Return'", "Assign'", "FunctionDef'", "Condition", "Expr'", "For", "Expr'", "Return'" ]
[ "def FUNC_18(self, VAR_50, **VAR_18):...\n", "VAR_57 = getattr(self._record, VAR_50.lower())\n", "VAR_57.assert_any_call(**kwargs)\n" ]
[ "def assert_any_call(self, verb, **kwargs):...\n", "mock_call = getattr(self._record, verb.lower())\n", "mock_call.assert_any_call(**kwargs)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_25(self, VAR_21):...\n", "\"\"\"docstring\"\"\"\n", "VAR_57 = self.getfile(VAR_21, VAR_23=False)\n", "if VAR_57 == False:\n", "if not VAR_57[VAR_6] & FUNC_30.S_IFLNK:\n", "return VAR_57[VAR_9]\n" ]
[ "def readlink(self, path):...\n", "\"\"\"docstring\"\"\"\n", "p = self.getfile(path, follow_symlinks=False)\n", "if p == False:\n", "if not p[A_MODE] & stat.S_IFLNK:\n", "return p[A_TARGET]\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "Return'" ]
[ "def FUNC_1(self, VAR_0, VAR_1):...\n", "for method in ('render_' + VAR_0.method, 'render'):\n", "if hasattr(self, method):\n", "return self.filter_attributes(VAR_0, getattr(self, method)(VAR_0))\n" ]
[ "def render_recursive(self, request, depth):...\n", "for method in ('render_' + request.method, 'render'):\n", "if hasattr(self, method):\n", "return self.filter_attributes(request, getattr(self, method)(request))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Return'" ]
[ "def FUNC_4(self):...\n", "if self.redirected_to is None:\n", "return None\n", "VAR_14 = self.redirected_to.split('?')\n", "if len(VAR_14) != 2:\n", "VAR_0.warning(\"Redirected to an unexpected page: `%s'\", self.redirected_to)\n", "VAR_20 = decrypt_number(VAR_14[-1])\n", "VAR_0.warning(\"Unable to de...
[ "def get_submission_id(self):...\n", "if self.redirected_to is None:\n", "return None\n", "p = self.redirected_to.split('?')\n", "if len(p) != 2:\n", "logger.warning(\"Redirected to an unexpected page: `%s'\", self.redirected_to)\n", "submission_id = decrypt_number(p[-1])\n", "logger.warning(\"Unable ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Assign'", "Condition", "Expr'", "Assign'", "Expr'", "Return'", "Return'", "Return'" ]
[ "def FUNC_15(VAR_3):...\n", "VAR_0, VAR_10 = FUNC_0()\n", "VAR_18 = \"SELECT multi FROM {} WHERE name = '{}'\".format(CFG(\n 'poll_table_name'), VAR_3)\n", "VAR_22 = FUNC_3(VAR_10, VAR_18) == 1\n", "FUNC_1(VAR_0)\n", "return VAR_22\n" ]
[ "def isMultiChoice(poll_name):...\n", "conn, c = connectDB()\n", "req = \"SELECT multi FROM {} WHERE name = '{}'\".format(CFG('poll_table_name'\n ), poll_name)\n", "ret = queryOne(c, req) == 1\n", "closeDB(conn)\n", "return ret\n" ]
[ 0, 0, 4, 4, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_0(self):...\n", "Pep8CompliantTestCase.set_up(self)\n", "VAR_1 = FilterSpecificationFactory()\n", "VAR_2 = OrderSpecificationFactory()\n", "VAR_3 = get_current_registry()\n", "VAR_3.registerUtility(VAR_1, IFilterSpecificationFactory)\n", "VAR_3.registerUtility(VAR_2, IOrderSpecificationFactory...
[ "def set_up(self):...\n", "Pep8CompliantTestCase.set_up(self)\n", "flt_spec_fac = FilterSpecificationFactory()\n", "ord_spec_fac = OrderSpecificationFactory()\n", "reg = get_current_registry()\n", "reg.registerUtility(flt_spec_fac, IFilterSpecificationFactory)\n", "reg.registerUtility(ord_spec_fac, IOrd...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'" ]
[ "@property...\n", "return self._subworkflows.values()\n" ]
[ "@property...\n", "return self._subworkflows.values()\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def __eq__(self, VAR_10):...\n", "\"\"\"docstring\"\"\"\n", "return self.__hash__() == hash(VAR_10)\n" ]
[ "def __eq__(self, other):...\n", "\"\"\"docstring\"\"\"\n", "return self.__hash__() == hash(other)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_4(self, VAR_2, **VAR_3):...\n", "self.render('../error.html')\n" ]
[ "def get_error_html(self, status_code, **kwargs):...\n", "self.render('../error.html')\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_0(VAR_0):...\n", "warn('Skip lexing error..', VAR_0)\n", "VAR_0.lexer.skip(1)\n" ]
[ "def t_error(t):...\n", "warn('Skip lexing error..', t)\n", "t.lexer.skip(1)\n" ]
[ 0, 2, 0 ]
[ "FunctionDef'", "Expr'", "Expr'" ]
[ "def FUNC_12(self, VAR_10):...\n", "VAR_34 = 'The following plugins are currently enabled:'\n", "VAR_35 = 'The following plugins are currently disabled:'\n", "VAR_36 = 'The following plugin options are available:'\n", "VAR_37 = 'Profiles:'\n", "VAR_38 = VAR_34 + '(.*?)' + VAR_35\n", "VAR_39 = VAR_35 + '...
[ "def _load_sos_plugins(self, sosinfo):...\n", "ENABLED = 'The following plugins are currently enabled:'\n", "DISABLED = 'The following plugins are currently disabled:'\n", "OPTIONS = 'The following plugin options are available:'\n", "PROFILES = 'Profiles:'\n", "enablereg = ENABLED + '(.*?)' + DISABLED\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'" ]
[ "def FUNC_32(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_2 = {'SEVERITY': {'LOW': 6}, 'CONFIDENCE': {'HIGH': 6}}\n", "self.check_example('random_module.py', VAR_2)\n" ]
[ "def test_random_module(self):...\n", "\"\"\"docstring\"\"\"\n", "expect = {'SEVERITY': {'LOW': 6}, 'CONFIDENCE': {'HIGH': 6}}\n", "self.check_example('random_module.py', expect)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'" ]
[ "def FUNC_30():...\n", "if VAR_3 == 'text':\n", "print('Input file: %s' % VAR_75)\n", "VAR_52 = FUNC_2(VAR_15, VAR_2, VAR_3=output_mode, VAR_4=output_limit, VAR_5\n =spires, VAR_6=match_mode, VAR_7=no_cache, VAR_8=with_author_keywords,\n VAR_9=rebuild_cache, VAR_10=only_core_tags, VAR_11=extract_acronym...
[ "def process_lines():...\n", "if output_mode == 'text':\n", "print('Input file: %s' % source)\n", "output = get_keywords_from_text(text_lines, taxonomy_name, output_mode=\n output_mode, output_limit=output_limit, spires=spires, match_mode=\n match_mode, no_cache=no_cache, with_author_keywords=\n with...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Condition", "Return'", "Condition", "For", "Expr'" ]
[ "def FUNC_15(self, VAR_7, VAR_8=False, VAR_9=True, VAR_10=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_12 = self.all_processes[VAR_7]\n", "if VAR_7 != VAR_13.PROCESS_TYPE_REDIS_SERVER:\n", "assert len(VAR_12) == 1\n", "for VAR_16 in VAR_12:\n", "VAR_20 = VAR_16.process\n", "if VAR_20.poll() is not N...
[ "def _kill_process_type(self, process_type, allow_graceful=False,...\n", "\"\"\"docstring\"\"\"\n", "process_infos = self.all_processes[process_type]\n", "if process_type != ray_constants.PROCESS_TYPE_REDIS_SERVER:\n", "assert len(process_infos) == 1\n", "for process_info in process_infos:\n", "process ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Assert'", "For", "Assign'", "Condition", "Condition", "Condition", "Expr'", "Condition", "Expr'", "Expr'", "Condition", "Condition", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Condition", "Condition", "Expr'",...
[ "def FUNC_6(self, *VAR_4, **VAR_5):...\n", "return self._run_ssh(VAR_4, VAR_14=self.configuration.eqlx_cli_max_retries)\n" ]
[ "def _eql_execute(self, *args, **kwargs):...\n", "return self._run_ssh(args, attempts=self.configuration.eqlx_cli_max_retries)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_41(self):...\n", "for VAR_40 in self._names:\n", "yield VAR_40, getattr(self, VAR_40)\n" ]
[ "def items(self):...\n", "for name in self._names:\n", "yield name, getattr(self, name)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'" ]
[ "@VAR_6.setter...\n", "self.__dict__['model'] = VAR_6\n", "self.base_field.model = VAR_6\n" ]
[ "@model.setter...\n", "self.__dict__['model'] = model\n", "self.base_field.model = model\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'" ]
[ "def FUNC_3(self, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "self.execute_query(VAR_3)\n", "log.errror(e)\n", "self.conn.commit()\n" ]
[ "def add(self, query):...\n", "\"\"\"docstring\"\"\"\n", "self.execute_query(query)\n", "log.errror(e)\n", "self.conn.commit()\n" ]
[ 0, 0, 4, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'" ]
[ "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'" ]
[ "def FUNC_0(VAR_0=None):...\n", "VAR_1 = frappe.db.sql_list('select name from `tabLeave Type` order by name asc'\n )\n", "VAR_3 = FUNC_1(VAR_1)\n", "VAR_4 = FUNC_2(VAR_0, VAR_1)\n", "return VAR_3, VAR_4\n" ]
[ "def execute(filters=None):...\n", "leave_types = frappe.db.sql_list(\n 'select name from `tabLeave Type` order by name asc')\n", "columns = get_columns(leave_types)\n", "data = get_data(filters, leave_types)\n", "return columns, data\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_7(self):...\n", "VAR_7 = Timer()\n", "time.sleep(0.001)\n", "VAR_7.mark('thing1')\n", "time.sleep(0.001)\n", "VAR_7.mark('thing2')\n", "VAR_8 = VAR_7.finish()\n", "time.sleep(0.001)\n", "VAR_7.mark('thing1')\n", "time.sleep(0.001)\n", "VAR_7.mark('thing2')\n", "VAR_9 = VAR_7.finish()...
[ "def test_timer(self):...\n", "t = Timer()\n", "time.sleep(0.001)\n", "t.mark('thing1')\n", "time.sleep(0.001)\n", "t.mark('thing2')\n", "snapshot = t.finish()\n", "time.sleep(0.001)\n", "t.mark('thing1')\n", "time.sleep(0.001)\n", "t.mark('thing2')\n", "snapshot_2 = t.finish()\n", "assert s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assert'", "Assert'", "Assert'" ]
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "return psycopg2.connect('dbname=tournament')\n" ]
[ "def connect():...\n", "\"\"\"docstring\"\"\"\n", "return psycopg2.connect('dbname=tournament')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "@FUNC_0('edit', {'cluster_id': '{cluster_id}', 'export_id': '{export_id}'}, 2.0...\n", "VAR_18 = int(VAR_18)\n", "VAR_23 = GaneshaConf.instance(VAR_6)\n", "if not VAR_23.has_export(VAR_18):\n", "if VAR_15['name'] not in Ganesha.fsals_available():\n", "VAR_25 = VAR_23.update_export({'export_id': VAR_18, '...
[ "@NfsTask('edit', {'cluster_id': '{cluster_id}', 'export_id': '{export_id}'},...\n", "export_id = int(export_id)\n", "ganesha_conf = GaneshaConf.instance(cluster_id)\n", "if not ganesha_conf.has_export(export_id):\n", "if fsal['name'] not in Ganesha.fsals_available():\n", "old_export = ganesha_conf.update...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "For", "Condition", "Condition", "Expr'", "Expr'", "Return'" ]
[ "@scenario('../features/log_accessible.feature', 'get logs')...\n", "" ]
[ "@scenario('../features/log_accessible.feature', 'get logs')...\n", "" ]
[ 0, 0 ]
[ "Condition", "Condition" ]
[ "def FUNC_1():...\n", "\"\"\"docstring\"\"\"\n", "VAR_5 = {}\n", "for arg in request.args:\n", "VAR_8 = re.findall('page_(.*)', arg)\n", "return VAR_5\n", "if VAR_8:\n", "VAR_5[VAR_8[0]] = int(request.args.get(arg))\n" ]
[ "def get_page_args():...\n", "\"\"\"docstring\"\"\"\n", "pages = {}\n", "for arg in request.args:\n", "re_match = re.findall('page_(.*)', arg)\n", "return pages\n", "if re_match:\n", "pages[re_match[0]] = int(request.args.get(arg))\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "Condition", "Assign'" ]
[ "def FUNC_2(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "VAR_1 = {'name': self.volume_name, 'size': 1}\n", "self.driver._eql_execute('volume', 'create', VAR_1['name'], '%sG' % VAR_1[\n 'size'], 'pool', self.configuration.eqlx_pool, 'thin-provision').AndReturn...
[ "def test_create_volume(self):...\n", "self.driver._eql_execute = self.mox.CreateMock(self.driver._eql_execute)\n", "volume = {'name': self.volume_name, 'size': 1}\n", "self.driver._eql_execute('volume', 'create', volume['name'], '%sG' % volume\n ['size'], 'pool', self.configuration.eqlx_pool, 'thin-provis...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_2(self):...\n", "self.expected_requests([(\n 'http://localhost/auth/api/v1/accounts/self/xsrf_token', {'data': {},\n 'headers': {'X-XSRF-Token-Request': '1'}}, {'expiration_sec': 100,\n 'xsrf_token': 'token'}), ('http://localhost/a', {'data': {'foo': 'bar'},\n 'headers': {'X-XSRF-Token': 'to...
[ "def testXsrfRemoteSimple(self):...\n", "self.expected_requests([(\n 'http://localhost/auth/api/v1/accounts/self/xsrf_token', {'data': {},\n 'headers': {'X-XSRF-Token-Request': '1'}}, {'expiration_sec': 100,\n 'xsrf_token': 'token'}), ('http://localhost/a', {'data': {'foo': 'bar'},\n 'headers': {'X-XS...
[ 0, 5, 0, 5 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'" ]
[ "@classmethod...\n", "super(CLASS_8, VAR_14).register_options(VAR_22)\n", "VAR_34 = ', '.join('{}: [{}]'.format(str(VAR_32), ', '.join(sorted(VAR_50))\n ) for VAR_32, VAR_50 in OS_ALIASES.items())\n", "VAR_22('--paths', advanced=True, type=dict, help=\n 'Map of os names to lists of paths to jdks. These ...
[ "@classmethod...\n", "super(DistributionLocator, cls).register_options(register)\n", "human_readable_os_aliases = ', '.join('{}: [{}]'.format(str(key), ', '.join\n (sorted(val))) for key, val in OS_ALIASES.items())\n", "register('--paths', advanced=True, type=dict, help=\n 'Map of os names to lists of p...
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "@FUNC_1.command(aliases=['b', 'bod'])...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = asyncio.get_event_loop()\n", "VAR_7 = await VAR_6.run_in_executor(None, self.body_search, VAR_2)\n", "await VAR_1.send(VAR_7)\n" ]
[ "@eddb.command(aliases=['b', 'bod'])...\n", "\"\"\"docstring\"\"\"\n", "loop = asyncio.get_event_loop()\n", "result = await loop.run_in_executor(None, self.body_search, inp)\n", "await ctx.send(result)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_2(VAR_3):...\n", "VAR_37 = FUNC_4(VAR_3)\n", "if VAR_37:\n", "VAR_4, VAR_36 = VAR_37\n", "VAR_4 = FUNC_0(VAR_3)\n", "VAR_36 = FUNC_1(VAR_3, VAR_36)\n", "VAR_36 = FUNC_1(VAR_3, VAR_4)\n", "FUNC_3(VAR_3, (VAR_4, VAR_36))\n", "return VAR_4, VAR_36\n" ]
[ "def get_valid_url_range(base_url):...\n", "start_end = load_pickle_data(base_url)\n", "if start_end:\n", "start, end = start_end\n", "start = _get_first_valid_url(base_url)\n", "end = _get_last_valid_url(base_url, end)\n", "end = _get_last_valid_url(base_url, start)\n", "dump_pickle_data(base_url, (s...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "@staticmethod...\n", "return 1\n" ]
[ "@staticmethod...\n", "return 1\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return CLASS_1(*self._path[1:])\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return TraversalPath(*self._path[1:])\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_12(self):...\n", "return Java.global_javac_classpath(self.context.products)\n" ]
[ "def javac_classpath(self):...\n", "return Java.global_javac_classpath(self.context.products)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_20(VAR_36):...\n", "VAR_63 = {}\n", "for VAR_62, info in VAR_36.items():\n", "if VAR_62.core:\n", "return VAR_63\n", "VAR_63[VAR_62] = info\n" ]
[ "def _filter_core_keywors(keywords):...\n", "matches = {}\n", "for kw, info in keywords.items():\n", "if kw.core:\n", "return matches\n", "matches[kw] = info\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "For", "Condition", "Return'", "Assign'" ]
[ "def FUNC_5():...\n", "def FUNC_7(VAR_11):...\n", "return True\n" ]
[ "def test_it_filters_on_files():...\n", "def directory_filter(_path):...\n", "return True\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Return'" ]
[ "def FUNC_2(VAR_17=settings.DEFAULT_ORDER_BY, VAR_18=settings....\n", "return 'string' % {'order_by': settings.DEFAULT_ORDER_BY, 'partition_by':\n settings.DEFAULT_PARTITION_BY, 'version_column': settings.\n DEFAULT_VERSION_COLUMN, 'sample_expr': settings.DEFAULT_SAMPLE_EXPR}\n" ]
[ "def get_test_engine(order_by=settings.DEFAULT_ORDER_BY, partition_by=...\n", "return \"\"\"\n ReplacingMergeTree(%(version_column)s)\n PARTITION BY %(partition_by)s\n ORDER BY %(order_by)s\n SAMPLE BY %(sample_expr)s ;\"\"\" % {\n 'order_by': settings.DEFAULT_ORDER_BY, 'partition_b...
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_23(self, *VAR_69, **VAR_70):...\n", "def FUNC_39(VAR_101):...\n", "VAR_101.output = VAR_69, VAR_70\n", "return VAR_101\n" ]
[ "def output(self, *paths, **kwpaths):...\n", "def decorate(ruleinfo):...\n", "ruleinfo.output = paths, kwpaths\n", "return ruleinfo\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_8(self, VAR_3):...\n", "VAR_8 = '%s-%s' % (self.__cluster_name, VAR_3)\n", "VAR_5 = [{'cloudProvider': 'gce', 'asgName': VAR_8, 'serverGroupName':\n VAR_8, 'region': self.TEST_REGION, 'zone': self.TEST_ZONE, 'type':\n 'destroyServerGroup', 'regions': [self.TEST_REGION], 'zones': [self.\n TEST...
[ "def destroy_server_group(self, version):...\n", "serverGroupName = '%s-%s' % (self.__cluster_name, version)\n", "job = [{'cloudProvider': 'gce', 'asgName': serverGroupName,\n 'serverGroupName': serverGroupName, 'region': self.TEST_REGION, 'zone':\n self.TEST_ZONE, 'type': 'destroyServerGroup', 'regions':...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_17(self):...\n", "self.run_test_case(self.scenario.destroy_server_group('v001'))\n" ]
[ "def test_h_destroy_server_group_v001(self):...\n", "self.run_test_case(self.scenario.destroy_server_group('v001'))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_5(self, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = self.bindings\n", "VAR_7 = VAR_1['TEST_APP_COMPONENT_NAME']\n", "VAR_8 = VAR_1['TEST_AWS_REGION']\n", "VAR_9 = [VAR_8 + 'a', VAR_8 + 'b']\n", "if VAR_5:\n", "VAR_16 = 'internal (defaultvpc)'\n", "VAR_16 = ''\n", "VAR_17 = VAR_1['...
[ "def upsert_load_balancer(self, use_vpc):...\n", "\"\"\"docstring\"\"\"\n", "bindings = self.bindings\n", "load_balancer_name = bindings['TEST_APP_COMPONENT_NAME']\n", "region = bindings['TEST_AWS_REGION']\n", "avail_zones = [region + 'a', region + 'b']\n", "if use_vpc:\n", "subnet_type = 'internal (d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "AugAssign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Return...
[ "def FUNC_16(VAR_1, VAR_8, **VAR_6):...\n", "import sql\n", "VAR_56 = sql.get_setting('tmp_config_path') + '/' + FUNC_2('config') + '.cfg'\n", "VAR_51 = ''\n", "os.system('dos2unix ' + VAR_8)\n", "return 'Please install dos2unix'\n", "if VAR_6.get('keepalived') == 1:\n", "if VAR_6.get('just_save') == ...
[ "def upload_and_restart(serv, cfg, **kwargs):...\n", "import sql\n", "tmp_file = sql.get_setting('tmp_config_path') + '/' + get_data('config'\n ) + '.cfg'\n", "error = ''\n", "os.system('dos2unix ' + cfg)\n", "return 'Please install dos2unix'\n", "if kwargs.get('keepalived') == 1:\n", "if kwargs.ge...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Import'", "Assign'", "Assign'", "Expr'", "Return'", "Condition", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "AugAssign'", "Condition", "Assign'", "Assign'", "AugAssign'", "AugAssign'", "Condition", "Expr'", "Return'" ]
[ "def FUNC_24(self):...\n", "VAR_13 = webapp2.Request({})\n", "self.assertIsNone(handler.service_to_service_authentication(VAR_13))\n" ]
[ "def test_non_applicable(self):...\n", "request = webapp2.Request({})\n", "self.assertIsNone(handler.service_to_service_authentication(request))\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "@api.multi...\n", "VAR_59 = self.env['res.partner.check.double'].create({'partner_id': self.id})\n", "return {'type': 'ir.actions.act_window', 'res_model':\n 'res.partner.check.double', 'res_id': VAR_59.id, 'view_type': 'form',\n 'view_mode': 'form', 'target': 'new'}\n" ]
[ "@api.multi...\n", "partner_wizard = self.env['res.partner.check.double'].create({'partner_id':\n self.id})\n", "return {'type': 'ir.actions.act_window', 'res_model':\n 'res.partner.check.double', 'res_id': partner_wizard.id, 'view_type':\n 'form', 'view_mode': 'form', 'target': 'new'}\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_0(VAR_3):...\n", "VAR_5 = (\n \"SELECT item_id from twitter_bot_vac_last_replied_id where name = '{0}'\"\n .format(VAR_3))\n", "VAR_1 = psycopg2.connect(VAR_0)\n", "print('Error %s' % e)\n", "if VAR_1:\n", "return VAR_2[0]\n", "VAR_6 = VAR_1.cursor()\n", "VAR_1.close()\n", "VAR_6.exe...
[ "def getLastReplied(messageType):...\n", "QUERY = (\n \"SELECT item_id from twitter_bot_vac_last_replied_id where name = '{0}'\"\n .format(messageType))\n", "conn = psycopg2.connect(connectionString)\n", "print('Error %s' % e)\n", "if conn:\n", "return result[0]\n", "cur = conn.cursor()\n", "con...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Condition", "Return'", "Assign'", "Expr'", "Expr'", "Assign'" ]
[ "def FUNC_21(VAR_14, VAR_15):...\n", "if not VAR_15 in VAR_1:\n", "VAR_1[VAR_15] = CachedPoints(VAR_13, VAR_14, VAR_1['content'])\n", "return VAR_1[VAR_15]\n" ]
[ "def points(user, key):...\n", "if not key in context:\n", "context[key] = CachedPoints(instance, user, context['content'])\n", "return context[key]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'" ]
[ "@api.route('/songs/<int:id>/related')...\n", "VAR_3 = request.args.get('top')\n", "VAR_2 = Song.query.filter_by(VAR_1=id).first()\n", "if not VAR_2:\n", "return route_not_found(VAR_2)\n", "return make_response(jsonify(VAR_2.get_related_songs_json(VAR_3)), 200)\n" ]
[ "@api.route('/songs/<int:id>/related')...\n", "top = request.args.get('top')\n", "song = Song.query.filter_by(id=id).first()\n", "if not song:\n", "return route_not_found(song)\n", "return make_response(jsonify(song.get_related_songs_json(top)), 200)\n" ]
[ 0, 4, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def FUNC_5(self, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = self.bindings\n", "VAR_7 = VAR_1['TEST_APP_COMPONENT_NAME']\n", "VAR_8 = VAR_1['TEST_AWS_REGION']\n", "VAR_9 = [VAR_8 + 'a', VAR_8 + 'b']\n", "if VAR_5:\n", "VAR_16 = 'internal (defaultvpc)'\n", "VAR_16 = ''\n", "VAR_17 = VAR_1['...
[ "def upsert_load_balancer(self, use_vpc):...\n", "\"\"\"docstring\"\"\"\n", "bindings = self.bindings\n", "load_balancer_name = bindings['TEST_APP_COMPONENT_NAME']\n", "region = bindings['TEST_AWS_REGION']\n", "avail_zones = [region + 'a', region + 'b']\n", "if use_vpc:\n", "subnet_type = 'internal (d...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "AugAssign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Return...
[ "@classmethod...\n", "VAR_17 = str(VAR_12)\n", "VAR_18 = \"UPPER(tag.name) LIKE UPPER('%%%s%%')\" % VAR_17\n", "return self.select(VAR_18)\n" ]
[ "@classmethod...\n", "text_query_str = str(text_query)\n", "sql_query = \"UPPER(tag.name) LIKE UPPER('%%%s%%')\" % text_query_str\n", "return self.select(sql_query)\n" ]
[ 0, 4, 4, 4 ]
[ "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_23(VAR_31, VAR_32, VAR_3, VAR_33, VAR_34=apply_wildcards, VAR_35=None...\n", "for VAR_10, VAR_9 in VAR_32.allitems():\n", "VAR_48 = len(VAR_31)\n", "VAR_49 = True\n", "if callable(VAR_9):\n", "if not_iterable(VAR_9):\n", "VAR_9 = VAR_9(VAR_33)\n", "if not_iterable(VAR_9):\n", "VAR_9 = [VAR...
[ "def _apply_wildcards(newitems, olditems, wildcards, wildcards_obj,...\n", "for name, item in olditems.allitems():\n", "start = len(newitems)\n", "is_iterable = True\n", "if callable(item):\n", "if not_iterable(item):\n", "item = item(wildcards_obj)\n", "if not_iterable(item):\n", "item = [item]\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", "For", "Assign'", "Assign'", "Condition", "Condition", "Assign'", "Condition", "Assign'", "For", "Assign'", "For", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Expr'", "Expr'", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assig...
[ "def FUNC_5(VAR_12):...\n", "def FUNC_9(self, *VAR_15, **VAR_75):...\n", "for validator in VAR_0:\n", "if VAR_102.method == 'POST' and hasattr(self, 'ajax_login_redirect'):\n", "return FUNC_9\n", "validator(VAR_75)\n", "VAR_16 = self.build_arg_list(VAR_12, VAR_75)\n", "return self.ajax_login_redirect(...
[ "def val(fn):...\n", "def newfn(self, *a, **env):...\n", "for validator in simple_vals:\n", "if request.method == 'POST' and hasattr(self, 'ajax_login_redirect'):\n", "return newfn\n", "validator(env)\n", "kw = self.build_arg_list(fn, env)\n", "return self.ajax_login_redirect('/')\n", "return self.i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "For", "Condition", "Return'", "Expr'", "Assign'", "Return'", "Return'", "For", "Assign'", "Return'" ]
[ "@handled_slot(bool)...\n", "VAR_19, VAR_18 = QInputDialog.getInt(self.window, title=\n 'Set Thin Etalon Motor Position', label='Absolute Position:', value=\n self.matisse.query('MOTTE:POS?', numeric_result=True))\n", "if VAR_18:\n", "print(f'Setting thin etalon motor position to {VAR_19}.')\n", "self...
[ "@handled_slot(bool)...\n", "target_pos, success = QInputDialog.getInt(self.window, title=\n 'Set Thin Etalon Motor Position', label='Absolute Position:', value=\n self.matisse.query('MOTTE:POS?', numeric_result=True))\n", "if success:\n", "print(f'Setting thin etalon motor position to {target_pos}.')\n...
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Condition", "Expr'", "Expr'" ]
[ "def FUNC_0(self):...\n", "super(CLASS_0, self).setUp()\n", "self.configuration = mox.MockObject(conf.Configuration)\n", "self.configuration.append_config_values(mox.IgnoreArg())\n", "self.configuration.san_is_local = False\n", "self.configuration.san_ip = '10.0.0.1'\n", "self.configuration.san_login = ...
[ "def setUp(self):...\n", "super(DellEQLSanISCSIDriverTestCase, self).setUp()\n", "self.configuration = mox.MockObject(conf.Configuration)\n", "self.configuration.append_config_values(mox.IgnoreArg())\n", "self.configuration.san_is_local = False\n", "self.configuration.san_ip = '10.0.0.1'\n", "self.confi...
[ 0, 0, 0, 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'", "Expr'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "As...
[ "def __enter__(self):...\n", "return DBase()\n" ]
[ "def __enter__(self):...\n", "return DBase()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_2(self, VAR_5, VAR_15):...\n", "\"\"\"docstring\"\"\"\n", "VAR_46 = VAR_15\n", "VAR_47 = copy.copy(VAR_46)\n", "VAR_48 = 0\n", "while len(VAR_46) > 0:\n", "VAR_56 = 'string' % ','.join(map(str, VAR_46))\n", "return list(set(VAR_15))\n", "VAR_5.execute(VAR_56)\n", "VAR_61 = map(lambda x: ...
[ "def get_sub_items(self, cr, item_ids):...\n", "\"\"\"docstring\"\"\"\n", "parents_ids = item_ids\n", "items_ids = copy.copy(parents_ids)\n", "loop_counter = 0\n", "while len(parents_ids) > 0:\n", "query = (\n \"\"\"SELECT id\n FROM budget_item\n WHERE pare...
[ 0, 0, 0, 0, 0, 4, 4, 0, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Return'", "Expr'", "Assign'", "AugAssign'", "Assign'", "AugAssign'", "Condition" ]
[ "def FUNC_6(self):...\n", "VAR_10 = traversal.TraversalPath.parse('level2') + 'name'\n", "self.assertEqual(traversal.TraversalPath.parse('level2.name'), VAR_10)\n", "VAR_10 = traversal.TraversalPath.parse('level2s[b]'\n ) + traversal.TraversalPath.parse('level3s[1].name')\n", "self.assertEqual(traversal....
[ "def test_add(self):...\n", "actual = traversal.TraversalPath.parse('level2') + 'name'\n", "self.assertEqual(traversal.TraversalPath.parse('level2.name'), actual)\n", "actual = traversal.TraversalPath.parse('level2s[b]'\n ) + traversal.TraversalPath.parse('level3s[1].name')\n", "self.assertEqual(traversa...
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_5(self, VAR_5):...\n", "return True\n" ]
[ "def verify_location(self, location):...\n", "return True\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def __init__(self, *VAR_2, **VAR_3):...\n", "super(CLASS_0, self).__init__(*VAR_2, **kwargs)\n", "self.common = None\n", "self.configuration.append_config_values(hpcommon.hp3par_opts)\n", "self.configuration.append_config_values(san.san_opts)\n" ]
[ "def __init__(self, *args, **kwargs):...\n", "super(HP3PARFCDriver, self).__init__(*args, **kwargs)\n", "self.common = None\n", "self.configuration.append_config_values(hpcommon.hp3par_opts)\n", "self.configuration.append_config_values(san.san_opts)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'" ]
[ "def __getstate__(self):...\n", "return self.serialize()\n" ]
[ "def __getstate__(self):...\n", "return self.serialize()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_16(self, VAR_66):...\n", "\"\"\"docstring\"\"\"\n", "VAR_99 = snakemake.io.load_configfile(VAR_66)\n", "update_config(VAR_85, VAR_99)\n", "update_config(VAR_85, self.overwrite_config)\n" ]
[ "def configfile(self, jsonpath):...\n", "\"\"\"docstring\"\"\"\n", "c = snakemake.io.load_configfile(jsonpath)\n", "update_config(config, c)\n", "update_config(config, self.overwrite_config)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'" ]
[ "def FUNC_13(self, VAR_16):...\n", "\"\"\"docstring\"\"\"\n", "self._check_volume(VAR_16)\n", "VAR_0.warn(_('Volume %s was not found while trying to delete it'), VAR_16[\n 'name'])\n", "self._eql_execute('volume', 'select', VAR_16['name'], 'offline')\n", "VAR_0.error(_('Failed to delete volume %s'), VA...
[ "def delete_volume(self, volume):...\n", "\"\"\"docstring\"\"\"\n", "self._check_volume(volume)\n", "LOG.warn(_('Volume %s was not found while trying to delete it'), volume['name']\n )\n", "self._eql_execute('volume', 'select', volume['name'], 'offline')\n", "LOG.error(_('Failed to delete volume %s'), ...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def FUNC_4(self, VAR_3):...\n", "" ]
[ "def del_response_handler(self, reqid):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "VAR_32 = 'string'.format(VAR_18)\n", "VAR_30 = db.engine.execute(VAR_32)\n", "if VAR_30.rowcount == 0:\n", "VAR_34 = UserMappedProjectsDTO()\n", "for row in VAR_30:\n", "VAR_39 = MappedProject()\n", "return VAR_34\n", "VAR_39.project_id = row[0]\n"...
[ "@staticmethod...\n", "\"\"\"docstring\"\"\"\n", "sql = (\n \"\"\"SELECT p.id,\n p.status,\n p.default_locale,\n c.mapped,\n c.validated,\n st_asgeojson(p.centroid)\n FROM proj...
[ 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Assign'", "Assign'", "Condition", "Assign'", "For", "Assign'", "Return'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_7(self, VAR_13, VAR_11, VAR_7, VAR_14, VAR_10):...\n", "VAR_17 = [(x, os.path.join(x.path, VAR_11['name'])) for x in VAR_14]\n", "if VAR_7.do_existing_paths():\n", "VAR_17 = [(x, y) for x, y in VAR_17 if os.path.isdir(y)]\n", "return VAR_17\n" ]
[ "def get_directories(self, levelctx, levelfields, searcher, ctxlist, client):...\n", "candidates = [(x, os.path.join(x.path, levelfields['name'])) for x in ctxlist]\n", "if searcher.do_existing_paths():\n", "candidates = [(x, y) for x, y in candidates if os.path.isdir(y)]\n", "return candidates\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "Return'" ]
[ "import pymysql\n", "import db_config\n", "def FUNC_0(self, VAR_0='crimemap'):...\n", "return pymysql.connect(host='localhost', user=db_config.db_user, password=\n db_config.db_password, db=database)\n" ]
[ "import pymysql\n", "import db_config\n", "def connect(self, database='crimemap'):...\n", "return pymysql.connect(host='localhost', user=db_config.db_user, password=\n db_config.db_password, db=database)\n" ]
[ 0, 0, 0, 0 ]
[ "Import'", "Import'", "FunctionDef'", "Return'" ]
[ "def FUNC_9(self, VAR_5):...\n", "settings.DYNAMIC_LINK = VAR_5\n", "return self\n" ]
[ "def given_a_dynamic_link(self, dynamic_link):...\n", "settings.DYNAMIC_LINK = dynamic_link\n", "return self\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "if VAR_101.user_is_loggedin and VAR_101.user.safe_karma >= g.discussion_karma_to_post:\n", "return True\n", "abort(403, 'forbidden')\n" ]
[ "def run(self):...\n", "if c.user_is_loggedin and c.user.safe_karma >= g.discussion_karma_to_post:\n", "return True\n", "abort(403, 'forbidden')\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Expr'" ]
[ "def FUNC_0(self):...\n", "super().setUp()\n", "self.runner = executors.Runner(policies.AsynchronousExecutionPolicy())\n", "self.runner.policy.keep_stage_files = True\n", "self.monitor = CLASS_1()\n", "self.runner.policy.task_listeners.append(self.monitor)\n" ]
[ "def setUp(self):...\n", "super().setUp()\n", "self.runner = executors.Runner(policies.AsynchronousExecutionPolicy())\n", "self.runner.policy.keep_stage_files = True\n", "self.monitor = TaskEventMonitor()\n", "self.runner.policy.task_listeners.append(self.monitor)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'" ]
[ "from flask import Blueprint, request\n", "from api import require_apikey\n", "from api.apiutils import *\n", "VAR_0 = Blueprint('location', __name__)\n", "@VAR_0.route('/ping')...\n", "return 'pong'\n" ]
[ "from flask import Blueprint, request\n", "from api import require_apikey\n", "from api.apiutils import *\n", "locations = Blueprint('location', __name__)\n", "@locations.route('/ping')...\n", "return 'pong'\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_2(self):...\n", "" ]
[ "def tearDown(self):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_14(self):...\n", "return self._get_ancestors().values()\n" ]
[ "def get_ancestors(self):...\n", "return self._get_ancestors().values()\n" ]
[ 0, 1 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_28(self, VAR_15):...\n", "" ]
[ "def edit(self, item):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]