lines
listlengths
1
444
raw_lines
listlengths
1
444
label
listlengths
1
444
type
listlengths
1
444
[ "def FUNC_0(VAR_2, VAR_3):...\n", "VAR_4 = {requests.codes.NOT_FOUND: {'202': exceptions.\n BackendResourceNotFound, 'default': exceptions.ResourceNotFound},\n requests.codes.PRECONDITION_FAILED: exceptions.StaleRevision, requests.\n codes.INTERNAL_SERVER_ERROR: {'99': exceptions.ClientCertificateNotTrus...
[ "def http_error_to_exception(status_code, error_code):...\n", "errors = {requests.codes.NOT_FOUND: {'202': exceptions.\n BackendResourceNotFound, 'default': exceptions.ResourceNotFound},\n requests.codes.PRECONDITION_FAILED: exceptions.StaleRevision, requests.\n codes.INTERNAL_SERVER_ERROR: {'99': except...
[ 0, 5, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Condition", "Return'", "Condition", "Return'", "Return'", "Condition", "Return'" ]
[ "@staticmethod...\n", "def FUNC_13(VAR_9, VAR_7, VAR_11, VAR_10):...\n", "if VAR_11 == 'POST':\n", "return CLASS_0.session.post(FUNC_2(VAR_7), VAR_9=ToUtf8Json(data), headers=\n _HEADERS, VAR_10=timeout)\n", "if VAR_11 == 'GET':\n", "return CLASS_0.session.get(FUNC_2(VAR_7), headers=_HEADERS, VAR_10=ti...
[ "@staticmethod...\n", "def SendRequest(data, handler, method, timeout):...\n", "if method == 'POST':\n", "return BaseRequest.session.post(_BuildUri(handler), data=ToUtf8Json(data),\n headers=_HEADERS, timeout=timeout)\n", "if method == 'GET':\n", "return BaseRequest.session.get(_BuildUri(handler), head...
[ 0, 0, 0, 7, 0, 7, 0, 0, 7, 0, 0, 0, 0, 0 ]
[ "Condition", "FunctionDef'", "Condition", "Return'", "Condition", "Return'", "Condition", "Condition", "Return'", "Condition", "Return'", "Condition", "Return'", "Return'" ]
[ "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_6(self, VAR_11):...\n", "if VAR_11 and is_banned_domain(VAR_11):\n", "VAR_101.errors.add(errors.BANNED_DOMAIN)\n" ]
[ "def run(self, url):...\n", "if url and is_banned_domain(url):\n", "c.errors.add(errors.BANNED_DOMAIN)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'" ]
[ "def FUNC_0(self):...\n", "\"\"\"docstring\"\"\"\n", "return database_utilities.execute_query('select * from admins')\n" ]
[ "def get(self):...\n", "\"\"\"docstring\"\"\"\n", "return database_utilities.execute_query('select * from admins')\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_4 = '/api/apps/{app_id}/containers'.format(**locals())\n", "VAR_5 = self.client.get(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 2...
[ "def test_container_api_heroku(self):...\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/containers'.format(**locals())\n", "response = self.client.get(url)\n", "self.assertEq...
[ 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Assign'", "A...
[ "import os\n", "from columnize import columnize\n", "from twisted.internet import defer\n", "from opennode.oms.endpoint.ssh import cmd, completion, cmdline\n", "from opennode.oms.endpoint.ssh.terminal import InteractiveTerminal\n", "from opennode.oms.endpoint.ssh.tokenizer import CommandLineTokenizer, Com...
[ "import os\n", "from columnize import columnize\n", "from twisted.internet import defer\n", "from opennode.oms.endpoint.ssh import cmd, completion, cmdline\n", "from opennode.oms.endpoint.ssh.terminal import InteractiveTerminal\n", "from opennode.oms.endpoint.ssh.tokenizer import CommandLineTokenizer, Com...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Import'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Expr'", "FunctionDef'", "Expr'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Condition", "R...
[ "\"\"\"string\"\"\"\n", "from lxml import etree\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder.volume.drivers.san.san import SanISCSIDriver\n", "VAR_0 = logging.getLogger(__name__)\n", "\"\"\"string\"\"\"\n", "VAR_1 = {}\n", "def __init__(s...
[ "\"\"\"\nHP Lefthand SAN ISCSI Driver.\n\nThe driver communicates to the backend aka Cliq via SSH to perform all the\noperations on the SAN.\n\"\"\"\n", "from lxml import etree\n", "from cinder import exception\n", "from cinder.openstack.common import log as logging\n", "from cinder.volume.drivers.san.san i...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 2, 2 ]
[ "Expr'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Assign'", "Expr'", "Assign'", "FunctionDef'", "Expr'", "Assign'", "FunctionDef'", "Docstring", "Assign'", "For", "Expr'", "Assign'", "Return'" ]
[ "def __init__(self, VAR_0=None, *VAR_2, **VAR_3):...\n", "super(CLASS_0, self).__init__(*VAR_2, **kwargs)\n" ]
[ "def __init__(self, name=None, *args, **kwargs):...\n", "super(PrimaryKeyField, self).__init__(*args, **kwargs)\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Expr'" ]
[ "def FUNC_10(self, VAR_14):...\n", "" ]
[ "def is_text(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_1(VAR_0, VAR_3, VAR_1, VAR_2):...\n", "VAR_4 = VAR_0.cursor()\n", "VAR_5 = 'ALTER TABLE Presets DROP COLUMN id;'\n", "VAR_4.execute(VAR_5)\n", "VAR_5 = (\n 'ALTER TABLE Presets ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY NOT NULL FIRST;'\n )\n", "VAR_4.execute(VAR_5)\n", "if VAR_1 != 'N...
[ "def edit_preset(conn, key, queryin, descriptin):...\n", "cursor = conn.cursor()\n", "quer = 'ALTER TABLE Presets DROP COLUMN id;'\n", "cursor.execute(quer)\n", "quer = (\n 'ALTER TABLE Presets ADD COLUMN id INT AUTO_INCREMENT PRIMARY KEY NOT NULL FIRST;'\n )\n", "cursor.execute(quer)\n", "if quer...
[ 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_9(self, VAR_9, VAR_12, VAR_8):...\n", "if VAR_9 is None:\n", "return VAR_9\n", "return [self.base_field.from_db_value(item, VAR_12, VAR_8) for item in VAR_9]\n" ]
[ "def _from_db_value(self, value, expression, connection):...\n", "if value is None:\n", "return value\n", "return [self.base_field.from_db_value(item, expression, connection) for\n item in value]\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Return'", "Return'" ]
[ "from datetime import timedelta\n", "from django.contrib.auth.models import User\n", "from django.core.urlresolvers import reverse\n", "from django.test import TestCase\n", "from django.test.client import Client\n", "from django.utils import timezone\n", "from course.models import Course, CourseInstance...
[ "from datetime import timedelta\n", "from django.contrib.auth.models import User\n", "from django.core.urlresolvers import reverse\n", "from django.test import TestCase\n", "from django.test.client import Client\n", "from django.utils import timezone\n", "from course.models import Course, CourseInstance...
[ 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "...
[ "def FUNC_0(self, VAR_4, VAR_5):...\n", "\"\"\"docstring\"\"\"\n", "VAR_6 = 'string'.format(VAR_5=' '.join(start_urls), VAR_4=report_dir)\n", "return VAR_6\n" ]
[ "def _expected_command(self, report_dir, start_urls):...\n", "\"\"\"docstring\"\"\"\n", "expected_statement = (\n 'pa11ycrawler run {start_urls} --pa11ycrawler-allowed-domains=localhost --pa11ycrawler-reports-dir={report_dir} --pa11ycrawler-deny-url-matcher=logout --pa11y-reporter=\"1.0-json\" --depth-limit=...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_9(VAR_7):...\n", "if VAR_1:\n", "print('about to get bracket for url {}'.format(VAR_7))\n", "VAR_6, VAR_45 = FUNC_5(VAR_7)\n", "VAR_46 = BeautifulSoup(VAR_6, 'html.parser')\n", "VAR_47 = VAR_46.find_all('script')\n", "VAR_14 = None\n", "for VAR_93 in VAR_47:\n", "if 'matches_by_round' in s...
[ "def get_bracket(url):...\n", "if debug:\n", "print('about to get bracket for url {}'.format(url))\n", "data, status = hit_url(url)\n", "soup = BeautifulSoup(data, 'html.parser')\n", "script = soup.find_all('script')\n", "bracket = None\n", "for s in script:\n", "if 'matches_by_round' in str(s):\n",...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "Condition", "Condition", "Assign'", "Expr'", "Return'", "Assign'", "Assign'" ]
[ "@VAR_0.route('/')...\n", "VAR_1 = get_db(VAR_0, g)\n", "return render_template('index.html')\n" ]
[ "@app.route('/')...\n", "con = get_db(app, g)\n", "return render_template('index.html')\n" ]
[ 0, 4, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "def FUNC_3(self, VAR_2, VAR_4, VAR_5):...\n", "return False\n" ]
[ "def has_object_permission(self, request, view, obj):...\n", "return False\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_10(self, VAR_13):...\n", "return VAR_13.name in self._localrules or VAR_13.norun\n" ]
[ "def is_local(self, rule):...\n", "return rule.name in self._localrules or rule.norun\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_12(self):...\n", "\"\"\"docstring\"\"\"\n", "self._state = None\n", "self._out = None\n" ]
[ "def reset(self):...\n", "\"\"\"docstring\"\"\"\n", "self._state = None\n", "self._out = None\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'" ]
[ "def FUNC_15(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_21 = [VAR_28 for VAR_28 in self.expanded_output if VAR_28.exists]\n", "if VAR_21:\n", "logger.info(\n \"\"\"Removing output files of failed job {} since they might be corrupted:\n{}\"\"\"\n .format(self, ', '.join(VAR_21)))\n", "for VAR_28 i...
[ "def cleanup(self):...\n", "\"\"\"docstring\"\"\"\n", "to_remove = [f for f in self.expanded_output if f.exists]\n", "if to_remove:\n", "logger.info(\n \"\"\"Removing output files of failed job {} since they might be corrupted:\n{}\"\"\"\n .format(self, ', '.join(to_remove)))\n", "for f in to_remove...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Expr'", "For", "Expr'" ]
[ "def FUNC_2(VAR_3):...\n", "return CLASS_0.all().filter('user_id =', VAR_3).get()\n" ]
[ "def check_user_id(user_id):...\n", "return Authorization.all().filter('user_id =', user_id).get()\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_4(self):...\n", "VAR_1 = '/api/apps'\n", "VAR_2 = self.client.post(VAR_1)\n", "self.assertEqual(VAR_2.status_code, 201)\n", "VAR_3 = VAR_2.data['id']\n", "VAR_1 = '/api/apps/{app_id}/builds'.format(**locals())\n", "VAR_4 = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': json.\n d...
[ "def test_destroy_chaos(self):...\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/builds'.format(**locals())\n", "body = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", ...
[ "def FUNC_0():...\n", "VAR_1 = {'foo': 'bar'}\n", "VAR_2 = load_source(VAR_1)\n", "assert VAR_2 == VAR_1\n" ]
[ "def test_native_mapping_is_passthrough():...\n", "source = {'foo': 'bar'}\n", "result = load_source(source)\n", "assert result == source\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assert'" ]
[ "def FUNC_6(*VAR_12):...\n", "\"\"\"docstring\"\"\"\n", "VAR_23 = np.asarray(VAR_12[0])\n", "if VAR_23.shape[0] != VAR_23.shape[1]:\n", "if not np.allclose(VAR_23 @ VAR_23.conj().T, np.identity(VAR_23.shape[0]),\n", "return VAR_23\n" ]
[ "def unitary(*args):...\n", "\"\"\"docstring\"\"\"\n", "U = np.asarray(args[0])\n", "if U.shape[0] != U.shape[1]:\n", "if not np.allclose(U @ U.conj().T, np.identity(U.shape[0]), atol=tolerance):\n", "return U\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Condition", "Condition", "Return'" ]
[ "@pytest.fixture...\n", "while VAR_0 is None:\n", "VAR_12 = random.randint(1, 10000)\n", "return VAR_3.run_until_complete(VAR_5(VAR_4))\n", "VAR_0 = f'amichay.oren+{VAR_12}@gmail.com'\n", "if User.username_exists(VAR_0):\n", "VAR_0 = None\n" ]
[ "@pytest.fixture...\n", "while username is None:\n", "i = random.randint(1, 10000)\n", "return loop.run_until_complete(sanic_client(app))\n", "username = f'amichay.oren+{i}@gmail.com'\n", "if User.username_exists(username):\n", "username = None\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Assign'" ]
[ "@session_manager...\n", "\"\"\"docstring\"\"\"\n", "from invenio.modules.accounts.models import User, UserEXT\n", "from invenio.ext.sqlalchemy import db\n", "from ..handlers import token_session_key\n", "from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound\n", "import json\n", "import r...
[ "@session_manager...\n", "\"\"\"docstring\"\"\"\n", "from invenio.modules.accounts.models import User, UserEXT\n", "from invenio.ext.sqlalchemy import db\n", "from ..handlers import token_session_key\n", "from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound\n", "import json\n", "import r...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "ImportFrom'", "ImportFrom'", "ImportFrom'", "ImportFrom'", "Import'", "Import'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Condition", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Expr'", "Assign'", "Expr'", ...
[ "def __init__(self, VAR_2=None):...\n", "self.total = 0\n", "self.success = 0\n", "self.failure = 0\n", "self.error = 0\n", "self.undecided = 0\n", "self.total_time = 0.0\n", "self.max_time = 0.0\n", "self.log_dir = VAR_2\n", "if self.log_dir is not None:\n", "os.makedirs(self.log_dir)\n" ]
[ "def __init__(self, log_dir=None):...\n", "self.total = 0\n", "self.success = 0\n", "self.failure = 0\n", "self.error = 0\n", "self.undecided = 0\n", "self.total_time = 0.0\n", "self.max_time = 0.0\n", "self.log_dir = log_dir\n", "if self.log_dir is not None:\n", "os.makedirs(self.log_dir)\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Expr'" ]
[ "def FUNC_25(self, VAR_14):...\n", "" ]
[ "def is_fk(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_3():...\n", "print('grocery== list')\n", "VAR_43 = Frame(self)\n", "VAR_43.rowconfigure(0, weight=1)\n", "VAR_43.columnconfigure(0, weight=1)\n", "VAR_43.rowconfigure(1, weight=3)\n", "VAR_43.columnconfigure(1, weight=3)\n", "VAR_43.pack()\n", "VAR_15.pack_forget()\n", "VAR_9.pack_forget...
[ "def view_grocery_list():...\n", "print('grocery== list')\n", "groceryListFrame = Frame(self)\n", "groceryListFrame.rowconfigure(0, weight=1)\n", "groceryListFrame.columnconfigure(0, weight=1)\n", "groceryListFrame.rowconfigure(1, weight=3)\n", "groceryListFrame.columnconfigure(1, weight=3)\n", "groce...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "For", "For", "Assign'", "Expr'", "For", "For", "Expr'", "Assign'", "Expr'", "Assign'", ...
[ "def FUNC_1(VAR_1):...\n", "for VAR_5 in VAR_1.traverse():\n", "if VAR_5.path.startswith('LICENSES'):\n", "if VAR_5.path.find('license-rules.rst') >= 0:\n", "if not os.path.isfile(VAR_5.path):\n", "VAR_22.parse_lines(VAR_15, VAR_19.maxlines, VAR_5.path)\n" ]
[ "def scan_git_tree(tree):...\n", "for el in tree.traverse():\n", "if el.path.startswith('LICENSES'):\n", "if el.path.find('license-rules.rst') >= 0:\n", "if not os.path.isfile(el.path):\n", "parser.parse_lines(fd, args.maxlines, el.path)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Condition", "Condition", "Condition", "Expr'" ]
[ "def FUNC_3(self, VAR_2):...\n", "VAR_6 = os.path.join(self.namespace, VAR_2)\n", "self.etcd.write(VAR_6, None, dir=True, prevExist=False)\n", "FUNC_0('Error storing key %s: [%r]' % (VAR_2, repr(err)))\n" ]
[ "def span(self, key):...\n", "path = os.path.join(self.namespace, key)\n", "self.etcd.write(path, None, dir=True, prevExist=False)\n", "log_error('Error storing key %s: [%r]' % (key, repr(err)))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "def __init__(self, *VAR_1, **VAR_2):...\n", "super().__init__(*VAR_1, **kwargs)\n", "self.setup_logging()\n", "self.setup_window()\n", "self.setup_menus()\n", "self.setup_action_listeners()\n", "self.setup_log_window()\n", "self.setup_matisse()\n", "self.setup_widgets()\n", "self.aboutToQuit.conn...
[ "def __init__(self, *args, **kwargs):...\n", "super().__init__(*args, **kwargs)\n", "self.setup_logging()\n", "self.setup_window()\n", "self.setup_menus()\n", "self.setup_action_listeners()\n", "self.setup_log_window()\n", "self.setup_matisse()\n", "self.setup_widgets()\n", "self.aboutToQuit.conne...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "def __new__(VAR_22, VAR_3):...\n", "VAR_48 = str.__new__(VAR_22, VAR_3)\n", "VAR_48._is_function = type(VAR_3).__name__ == 'function'\n", "VAR_48._file = VAR_3\n", "VAR_48.rule = None\n", "VAR_48._regex = None\n", "return VAR_48\n" ]
[ "def __new__(cls, file):...\n", "obj = str.__new__(cls, file)\n", "obj._is_function = type(file).__name__ == 'function'\n", "obj._file = file\n", "obj.rule = None\n", "obj._regex = None\n", "return obj\n" ]
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "@staticmethod...\n", "VAR_31 = openid.get_current_user(VAR_3)\n", "return CLASS_4(VAR_31.sub, VAR_31.email, VAR_31.picture) if VAR_31 else None\n" ]
[ "@staticmethod...\n", "user = openid.get_current_user(request)\n", "return CurrentUser(user.sub, user.email, user.picture) if user else None\n" ]
[ 0, 0, 0 ]
[ "Condition", "Assign'", "Return'" ]
[ "@FUNC_7...\n", "\"\"\"docstring\"\"\"\n", "FUNC_1(VAR_1, VAR_2)\n", "return redirect('/')\n" ]
[ "@oauth_error_handler...\n", "\"\"\"docstring\"\"\"\n", "response_token_setter(remote, resp)\n", "return redirect('/')\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Expr'", "Return'" ]
[ "def FUNC_0(self, VAR_3):...\n", "VAR_5 = '%s timestamp' % str(VAR_3)\n", "return VAR_5\n" ]
[ "def create_field(self, name):...\n", "field_string = '%s timestamp' % str(name)\n", "return field_string\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.obj.__name__\n" ]
[ "@property...\n", "\"\"\"docstring\"\"\"\n", "return self.obj.__name__\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "def FUNC_0(VAR_0, VAR_1, VAR_2=None, VAR_3=False):...\n", "\"\"\"docstring\"\"\"\n", "VAR_1 = posixpath.normpath(unquote(VAR_1))\n", "VAR_1 = VAR_1.lstrip('/')\n", "VAR_10 = ''\n", "for VAR_18 in VAR_1.split('/'):\n", "if not VAR_18:\n", "if VAR_10 and VAR_1 != VAR_10:\n", "VAR_17, VAR_18 = os.path...
[ "def serve(request, path, document_root=None, show_indexes=False):...\n", "\"\"\"docstring\"\"\"\n", "path = posixpath.normpath(unquote(path))\n", "path = path.lstrip('/')\n", "newpath = ''\n", "for part in path.split('/'):\n", "if not part:\n", "if newpath and path != newpath:\n", "drive, part = os...
[ 0, 0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 0, 6, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "For", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Assign'", "Condition", "Condition", "Condition", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Return'", "Assign'", "Assign'", ...
[ "def FUNC_21(self):...\n", "VAR_14 = self.new_mocked_client(client.NSX3Client)\n", "VAR_14.create('ports', {'resource-name': 'port1'})\n", "FUNC_2('post', VAR_14, 'https://1.2.3.4/api/v1/ports', VAR_8=jsonutils.\n dumps({'resource-name': 'port1'}))\n" ]
[ "def test_create_resource(self):...\n", "api = self.new_mocked_client(client.NSX3Client)\n", "api.create('ports', {'resource-name': 'port1'})\n", "assert_json_call('post', api, 'https://1.2.3.4/api/v1/ports', data=\n jsonutils.dumps({'resource-name': 'port1'}))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Expr'" ]
[ "from __future__ import unicode_literals\n", "import frappe, unittest\n", "from frappe.model.db_query import DatabaseQuery\n", "from frappe.desk.reportview import get_filters_cond\n", "def FUNC_1(self):...\n", "self.assertTrue({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n limit_page_length...
[ "from __future__ import unicode_literals\n", "import frappe, unittest\n", "from frappe.model.db_query import DatabaseQuery\n", "from frappe.desk.reportview import get_filters_cond\n", "def test_basic(self):...\n", "self.assertTrue({'name': 'DocType'} in DatabaseQuery('DocType').execute(\n limit_page_le...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Import'", "ImportFrom'", "ImportFrom'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "FunctionDef'", "Expr'", "Expr'", "For", "Expr'", "For", "Expr'", ...
[ "@VAR_5.setter...\n", "self._benchmark = IOFile(VAR_5, VAR_16=self)\n" ]
[ "@benchmark.setter...\n", "self._benchmark = IOFile(benchmark, rule=self)\n" ]
[ 0, 0 ]
[ "Condition", "Assign'" ]
[ "def FUNC_12(self, VAR_5):...\n", "VAR_20 = VAR_5.args['username'][0]\n", "VAR_21 = VAR_5.args['password'][0]\n", "return credentials.UsernamePassword(VAR_20, VAR_21)\n" ]
[ "def _get_creds_from(self, request):...\n", "username = request.args['username'][0]\n", "password = request.args['password'][0]\n", "return credentials.UsernamePassword(username, password)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_13(VAR_6, VAR_5):...\n", "print('in makeStrings')\n", "print(VAR_5)\n", "if VAR_5 == []:\n", "return 'true'\n", "VAR_11 = '('\n", "for i in range(0, len(VAR_5) - 1):\n", "VAR_11 += ' ' + VAR_6 + \" = '\" + VAR_5[i] + \"' or \"\n", "VAR_11 += ' ' + VAR_6 + \" = '\" + VAR_5[len(VAR_5) - 1] +...
[ "def makeStrings(columnname, list):...\n", "print('in makeStrings')\n", "print(list)\n", "if list == []:\n", "return 'true'\n", "result = '('\n", "for i in range(0, len(list) - 1):\n", "result += ' ' + columnname + \" = '\" + list[i] + \"' or \"\n", "result += ' ' + columnname + \" = '\" + list[len(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Condition", "Return'", "Assign'", "For", "AugAssign'", "AugAssign'", "Expr'", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_2 = self.connect()\n", "VAR_3 = 'SELECT description FROM crimes;'\n", "VAR_2.close()\n", "cursor.execute(VAR_3)\n", "return cursor.fetchall()\n" ]
[ "def get_all_inputs(self):...\n", "connection = self.connect()\n", "query = 'SELECT description FROM crimes;'\n", "connection.close()\n", "cursor.execute(query)\n", "return cursor.fetchall()\n" ]
[ 0, 0, 0, 0, 4, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_19(self):...\n", "VAR_21, VAR_22 = shellutil.run_get_output(\"sysctl hw.ncpu |awk '{print $2}'\")\n", "if VAR_21:\n", "return int(VAR_22)\n" ]
[ "def get_processor_cores(self):...\n", "ret, output = shellutil.run_get_output(\"sysctl hw.ncpu |awk '{print $2}'\")\n", "if ret:\n", "return int(output)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Return'" ]
[ "def FUNC_17(self, VAR_19, VAR_18, VAR_20):...\n", "if VAR_18.collection:\n", "VAR_30 = self._ds.get_collection(VAR_18.collection)\n", "return 'X',\n", "return VAR_30[0],\n" ]
[ "def get_parameters(self, key, levelctx, pathctxlist):...\n", "if levelctx.collection:\n", "coll = self._ds.get_collection(levelctx.collection)\n", "return 'X',\n", "return coll[0],\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Return'" ]
[ "def FUNC_2(self):...\n", "VAR_7 = BokChoyTestSuite('')\n", "VAR_1 = 'tests'\n", "self.assertEqual(VAR_7.cmd, self._expected_command(VAR_1=name))\n" ]
[ "def test_default(self):...\n", "suite = BokChoyTestSuite('')\n", "name = 'tests'\n", "self.assertEqual(suite.cmd, self._expected_command(name=name))\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'" ]
[ "@functools.wraps(VAR_7)...\n", "assert isinstance(self, webapp2.RequestHandler)\n", "assert self.request.method == 'GET'\n", "if model.is_replica():\n", "VAR_40 = model.get_replication_state().primary_url\n", "return VAR_7(self, *VAR_9, **kwargs)\n", "VAR_41 = 'http://' if utils.is_local_dev_server() e...
[ "@functools.wraps(method)...\n", "assert isinstance(self, webapp2.RequestHandler)\n", "assert self.request.method == 'GET'\n", "if model.is_replica():\n", "primary_url = model.get_replication_state().primary_url\n", "return method(self, *args, **kwargs)\n", "protocol = 'http://' if utils.is_local_dev_se...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Assert'", "Assert'", "Condition", "Assign'", "Return'", "Assign'", "Assert'", "Assert'", "Expr'" ]
[ "def FUNC_6(self, VAR_2, VAR_3):...\n", "logging.debug('API: Getting remote host %s path %s contents' % (VAR_2, VAR_3))\n", "VAR_5 = list()\n", "logging.debug('Checking path %s' % VAR_3)\n", "if not self.remote_exists(VAR_2, VAR_3):\n", "while not self.remote_exists(VAR_2, VAR_3):\n", "for line in self....
[ "def remote_listing(self, host, path):...\n", "logging.debug('API: Getting remote host %s path %s contents' % (host, path))\n", "contents = list()\n", "logging.debug('Checking path %s' % path)\n", "if not self.remote_exists(host, path):\n", "while not self.remote_exists(host, path):\n", "for line in sel...
[ 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'", "Condition", "Condition", "For", "Expr'", "Expr'", "Return'", "Expr'", "Condition", "Assign'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'", "Condition", "Expr'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return VAR_18._check_executable_command(VAR_0=cls.executable, VAR_19=cls.\n prerequisite_command, VAR_20=cls.prerequisite_fail_msg)\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "return cls._check_executable_command(executable=cls.executable, command=cls\n .prerequisite_command, fail_msg=cls.prerequisite_fail_msg)\n" ]
[ 0, 0, 0 ]
[ "Condition", "Docstring", "Return'" ]
[ "@property...\n", "return self.extracted_text.data_document\n" ]
[ "@property...\n", "return self.extracted_text.data_document\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_1(self):...\n", "VAR_2 = self.connects()\n", "VAR_4 = 'SELECT description FROM crimes;'\n", "VAR_2.close()\n", "cursor.execute(VAR_4)\n", "return cursor.fetchall()\n" ]
[ "def get_all_inputs(self):...\n", "connection = self.connects()\n", "query = 'SELECT description FROM crimes;'\n", "connection.close()\n", "cursor.execute(query)\n", "return cursor.fetchall()\n" ]
[ 0, 0, 0, 0, 4, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_15(self, VAR_20=None, VAR_18=None, **VAR_3):...\n", "VAR_34 = VAR_3.pop('cache', False)\n", "VAR_20 = self.__prepare(VAR_20, VAR_18)\n", "VAR_22 = self._dataframe(VAR_20, VAR_3, VAR_34=cache)\n", "VAR_37 = StringIO()\n", "VAR_22.info(buf=buffer, memory_usage='deep')\n", "VAR_0.info(VAR_37.getv...
[ "def dataframe(self, sql=None, filename=None, **kwargs):...\n", "cache = kwargs.pop('cache', False)\n", "sql = self.__prepare(sql, filename)\n", "dataframe = self._dataframe(sql, kwargs, cache=cache)\n", "buffer = StringIO()\n", "dataframe.info(buf=buffer, memory_usage='deep')\n", "logger.info(buffer.ge...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_13(self):...\n", "for filename in ['cert_db.sqlite3', 'rf_model.pkl', 'rf_features.pkl']:\n", "os.rename('temp_' + filename, filename)\n", "os.remove(filename)\n" ]
[ "def tearDown(self):...\n", "for filename in ['cert_db.sqlite3', 'rf_model.pkl', 'rf_features.pkl']:\n", "os.rename('temp_' + filename, filename)\n", "os.remove(filename)\n" ]
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "For", "Expr'", "Expr'" ]
[ "@wraps(VAR_5)...\n", "VAR_26 = json.dumps(VAR_5(*VAR_18, **kwargs) or {'error':\n 'No data found for your request'}, default=serialize_to_json)\n", "VAR_63 = [('Content-Type', 'application/json'), ('Content-Length', str(len(\n VAR_26)))]\n", "return Response(VAR_26, status=200, VAR_63=headers)\n" ]
[ "@wraps(func)...\n", "result = json.dumps(func(*args, **kwargs) or {'error':\n 'No data found for your request'}, default=serialize_to_json)\n", "headers = [('Content-Type', 'application/json'), ('Content-Length', str(len\n (result)))]\n", "return Response(result, status=200, headers=headers)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_1(VAR_4, VAR_5, VAR_6):...\n", "VAR_11 = VAR_1.emails\n", "VAR_12 = {'gmail': VAR_5, 'facebook': VAR_6}\n", "VAR_11.insert(VAR_12)\n", "return HttpResponse('Gmail is: ' + VAR_5 + '. Facebook is: ' + VAR_6)\n" ]
[ "def addUser(request, gmail, fb):...\n", "emails = db.emails\n", "new_email = {'gmail': gmail, 'facebook': fb}\n", "emails.insert(new_email)\n", "return HttpResponse('Gmail is: ' + gmail + '. Facebook is: ' + fb)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_1(self):...\n", "self.assertEqual((0, 0), analyze_regression_range.\n _GetLowerAndUpperBoundCommitPositions(0, 0))\n", "self.assertEqual((0, 0), analyze_regression_range.\n _GetLowerAndUpperBoundCommitPositions(None, 0))\n", "self.assertEqual((0, 0), analyze_regression_range.\n _GetLowerAnd...
[ "def testGetLowerAndUpperBoundCopmmitPositions(self):...\n", "self.assertEqual((0, 0), analyze_regression_range.\n _GetLowerAndUpperBoundCommitPositions(0, 0))\n", "self.assertEqual((0, 0), analyze_regression_range.\n _GetLowerAndUpperBoundCommitPositions(None, 0))\n", "self.assertEqual((0, 0), analyze_...
[ 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "@app.route('/api/server/disconnect', methods=['PUT'])...\n", "controller.indi_server.disconnect()\n", "VAR_17 = not timeout(5)(lambda : not controller.indi_server.is_connected())()\n", "return notify('indi_server', 'indi_server_disconnect', controller.\n indi_server.to_map(), VAR_17)\n" ]
[ "@app.route('/api/server/disconnect', methods=['PUT'])...\n", "controller.indi_server.disconnect()\n", "is_error = not timeout(5)(lambda : not controller.indi_server.is_connected())()\n", "return notify('indi_server', 'indi_server_disconnect', controller.\n indi_server.to_map(), is_error)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Return'" ]
[ "def FUNC_1(self):...\n", "settings.SCHEDULER_MODULE = 'mock'\n", "settings.SSH_PRIVATE_KEY = ''\n" ]
[ "def tearDown(self):...\n", "settings.SCHEDULER_MODULE = 'mock'\n", "settings.SSH_PRIVATE_KEY = ''\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'" ]
[ "def FUNC_0():...\n", "if len(sys.argv) > 1:\n", "VAR_0 = int(sys.argv[1])\n", "if sys.version_info.major < 3:\n", "print('This script only runs in python3')\n", "VAR_1 = './data'\n", "return\n", "if not os.path.isdir(VAR_1):\n", "os.makedirs(VAR_1)\n", "VAR_2 = os.path.join(VAR_1, '{}_{}'.format(...
[ "def main():...\n", "if len(sys.argv) > 1:\n", "NUM_IMAGES_TO_GET = int(sys.argv[1])\n", "if sys.version_info.major < 3:\n", "print('This script only runs in python3')\n", "data_dir = './data'\n", "return\n", "if not os.path.isdir(data_dir):\n", "os.makedirs(data_dir)\n", "image_dir = os.path.join...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Return'", "Condition", "Expr'", "Assign'", "Condition", "Condition", "Expr'", "Expr'", "Assign'", "Return'", "Condition", "Assign'", "Expr'", "Expr'", "Return'", "Condition", "Expr'", "Assign'", ...
[ "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_7(self):...\n", "VAR_6 = self.client.get('/api/apps')\n", "VAR_8 = VAR_6.data['results'][0]['id']\n", "self.assertTrue(self.client.login(VAR_1='autotest-2', VAR_2='password'))\n", "VAR_6 = self.client.get('/api/apps/{}/perms'.format(VAR_8), content_type=\n 'application/json')\n", "self.assert...
[ "def test_list_errors(self):...\n", "response = self.client.get('/api/apps')\n", "app_id = response.data['results'][0]['id']\n", "self.assertTrue(self.client.login(username='autotest-2', password='password'))\n", "response = self.client.get('/api/apps/{}/perms'.format(app_id),\n content_type='application...
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_5(self, VAR_5, VAR_4, VAR_7):...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = '/camefrom/'\n", "VAR_25 = c.get(VAR_5)\n", "VAR_10 = VAR_25.headers['Set-Cookie']\n", "VAR_16 = VAR_32._session.token\n", "VAR_28 = auth_response(VAR_16, VAR_4)\n", "VAR_23 = OutstandingQueriesCache(VAR_32)\n", "VAR_...
[ "def acs(self, url, eppn, check_fn):...\n", "\"\"\"docstring\"\"\"\n", "came_from = '/camefrom/'\n", "resp = c.get(url)\n", "cookie = resp.headers['Set-Cookie']\n", "token = session._session.token\n", "authr = auth_response(token, eppn)\n", "oq_cache = OutstandingQueriesCache(session)\n", "oq_cache....
[ 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Expr'", "Expr'", "Expr'" ]
[ "async def FUNC_1(self, VAR_2: str) ->None:...\n", "VAR_7 = await as_future(session.query(database.Paste).filter(database.Paste\n .paste_id == VAR_2).first)\n", "if not VAR_7:\n", "self.set_status(404)\n", "self.set_header('Content-Type', 'text/plain; charset=utf-8')\n", "self.render('404.html', pageti...
[ "async def get(self, paste_id: str) ->None:...\n", "paste = await as_future(session.query(database.Paste).filter(database.Paste\n .paste_id == paste_id).first)\n", "if not paste:\n", "self.set_status(404)\n", "self.set_header('Content-Type', 'text/plain; charset=utf-8')\n", "self.render('404.html', pag...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "AsyncFunctionDef'", "Assign'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'", "Return'" ]
[ "def FUNC_23(self, VAR_12=False):...\n", "if self.DiagnosticsForCurrentFileReady():\n", "VAR_22 = self._latest_file_parse_request.Response()\n", "return []\n", "self._latest_file_parse_request = None\n", "if VAR_12:\n", "return vimsupport.ConvertDiagnosticsToQfList(VAR_22)\n", "return VAR_22\n" ]
[ "def GetDiagnosticsFromStoredRequest(self, qflist_format=False):...\n", "if self.DiagnosticsForCurrentFileReady():\n", "diagnostics = self._latest_file_parse_request.Response()\n", "return []\n", "self._latest_file_parse_request = None\n", "if qflist_format:\n", "return vimsupport.ConvertDiagnosticsToQf...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Return'", "Assign'", "Condition", "Return'", "Return'" ]
[ "def __str__(self):...\n", "return self.txt\n" ]
[ "def __str__(self):...\n", "return self.txt\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_3():...\n", "def FUNC_12():...\n", "VAR_18 = requests.get(FUNC_2('healthy'))\n", "VAR_18.raise_for_status()\n", "return VAR_18.json()\n" ]
[ "def _CheckServerIsHealthyWithCache():...\n", "def _ServerIsHealthy():...\n", "response = requests.get(_BuildUri('healthy'))\n", "response.raise_for_status()\n", "return response.json()\n" ]
[ 0, 0, 7, 0, 0 ]
[ "FunctionDef'", "FunctionDef'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_1(self, VAR_3):...\n", "\"\"\"docstring\"\"\"\n", "VAR_4 = '/api/keys'\n", "VAR_5 = {'id': 'mykey@box.local', 'public': VAR_3}\n", "VAR_6 = self.client.post(VAR_4, json.dumps(VAR_5), content_type=\n 'application/json')\n", "self.assertEqual(VAR_6.status_code, 201)\n", "VAR_7 = VAR_6.data['i...
[ "def _check_key(self, pubkey):...\n", "\"\"\"docstring\"\"\"\n", "url = '/api/keys'\n", "body = {'id': 'mykey@box.local', 'public': pubkey}\n", "response = self.client.post(url, json.dumps(body), content_type=\n 'application/json')\n", "self.assertEqual(response.status_code, 201)\n", "key_id = respon...
[ 0, 0, 0, 0, 5, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 5, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_8(self, VAR_12=False):...\n", "VAR_86 = self.rules\n", "if VAR_12:\n", "VAR_86 = filterfalse(Rule.has_wildcards, VAR_86)\n", "for VAR_13 in VAR_86:\n", "logger.rule_info(VAR_10=rule.name, docstring=rule.docstring)\n" ]
[ "def list_rules(self, only_targets=False):...\n", "rules = self.rules\n", "if only_targets:\n", "rules = filterfalse(Rule.has_wildcards, rules)\n", "for rule in rules:\n", "logger.rule_info(name=rule.name, docstring=rule.docstring)\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "Assign'", "For", "Docstring" ]
[ "@property...\n", "if self._hosts is None:\n", "self._hosts = set(self.hosts)\n", "return self._hosts\n" ]
[ "@property...\n", "if self._hosts is None:\n", "self._hosts = set(self.hosts)\n", "return self._hosts\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Condition", "Assign'", "Return'" ]
[ "def FUNC_5(VAR_3, VAR_10, VAR_2):...\n", "if '%(key)s' in VAR_3:\n", "VAR_3 = VAR_3.replace('%(key)s', VAR_10)\n", "if '%s' in VAR_3:\n", "VAR_3 = VAR_3.replace('%s', (VAR_2 or '') + '%')\n", "return VAR_3\n" ]
[ "def scrub_custom_query(query, key, txt):...\n", "if '%(key)s' in query:\n", "query = query.replace('%(key)s', key)\n", "if '%s' in query:\n", "query = query.replace('%s', (txt or '') + '%')\n", "return query\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Assign'", "Return'" ]
[ "def FUNC_6(self, VAR_3):...\n", "if VAR_3.name not in self.host_names:\n", "self.hosts.append(VAR_3)\n", "self._hosts.add(VAR_3.name)\n", "VAR_3.add_group(self)\n", "self.clear_hosts_cache()\n" ]
[ "def add_host(self, host):...\n", "if host.name not in self.host_names:\n", "self.hosts.append(host)\n", "self._hosts.add(host.name)\n", "host.add_group(self)\n", "self.clear_hosts_cache()\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Expr'", "Expr'", "Expr'", "Expr'" ]
[ "def __call__(self, VAR_11):...\n", "VAR_15 = []\n", "if self.param:\n", "for p in utils.tup(self.param):\n", "return self.run(*VAR_15)\n", "if self.post and VAR_102.post.get(p):\n", "VAR_33 = VAR_102.post[p]\n", "if self.get and VAR_102.get.get(p):\n", "VAR_15.append(VAR_33)\n", "VAR_33 = VAR_102...
[ "def __call__(self, url):...\n", "a = []\n", "if self.param:\n", "for p in utils.tup(self.param):\n", "return self.run(*a)\n", "if self.post and request.post.get(p):\n", "val = request.post[p]\n", "if self.get and request.get.get(p):\n", "a.append(val)\n", "val = request.get[p]\n", "if self.url ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Condition", "For", "Return'", "Condition", "Assign'", "Condition", "Expr'", "Assign'", "Condition", "Assign'", "Assign'" ]
[ "def FUNC_7(VAR_6, VAR_5=None):...\n", "VAR_46 = VAR_5.keys() if VAR_5 else []\n", "VAR_47 = list(FUNC_0(VAR_6=academic_year).filter(parent__isnull=False).\n filter(Q(child_leaf__isnull=False) | Q(child_branch__isnull=False)).\n select_related('education_group_year__education_group_type').values(\n 'pa...
[ "def _build_parent_list_by_education_group_year_id(academic_year, filters=None):...\n", "columns_needed_for_filters = filters.keys() if filters else []\n", "group_elements = list(search(academic_year=academic_year).filter(\n parent__isnull=False).filter(Q(child_leaf__isnull=False) | Q(\n child_branch__isn...
[ 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Assign'", "For", "Assign'", "Return'", "Expr'" ]
[ "@VAR_0.route('/logout')...\n", "VAR_19.pop('username', None)\n", "return redirect(url_for('index'))\n" ]
[ "@app.route('/logout')...\n", "session.pop('username', None)\n", "return redirect(url_for('index'))\n" ]
[ 0, 0, 0 ]
[ "Condition", "Expr'", "Return'" ]
[ "def FUNC_0():...\n", "\"\"\"docstring\"\"\"\n", "VAR_3 = {'TEST_STACK': str(CLASS_0.DEFAULT_TEST_ID), 'TEST_APP': \n 'gcpsmoketest' + CLASS_0.DEFAULT_TEST_ID}\n", "return st.ScenarioTestRunner.main(CLASS_0, default_binding_overrides=\n defaults, test_case_list=[GoogleSmokeTest])\n" ]
[ "def main():...\n", "\"\"\"docstring\"\"\"\n", "defaults = {'TEST_STACK': str(GoogleSmokeTestScenario.DEFAULT_TEST_ID),\n 'TEST_APP': 'gcpsmoketest' + GoogleSmokeTestScenario.DEFAULT_TEST_ID}\n", "return st.ScenarioTestRunner.main(GoogleSmokeTestScenario,\n default_binding_overrides=defaults, test_case_...
[ 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Return'" ]
[ "def FUNC_13(self, VAR_2):...\n", "return redirect(self._passphrase_next_url(VAR_2))\n" ]
[ "def _redirect_from_passphrase(self, request):...\n", "return redirect(self._passphrase_next_url(request))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_8(self, VAR_15):...\n", "VAR_32 = 1.0\n", "VAR_33 = 'GB'\n", "if VAR_15.endswith('MB'):\n", "VAR_32 = 1.0 / 1024\n", "if VAR_15.endswith('TB'):\n", "VAR_33 = 'MB'\n", "VAR_32 = 1.0 * 1024\n", "return VAR_32 * float(VAR_15.partition(VAR_33)[0])\n", "VAR_33 = 'TB'\n" ]
[ "def _get_space_in_gb(self, val):...\n", "scale = 1.0\n", "part = 'GB'\n", "if val.endswith('MB'):\n", "scale = 1.0 / 1024\n", "if val.endswith('TB'):\n", "part = 'MB'\n", "scale = 1.0 * 1024\n", "return scale * float(val.partition(part)[0])\n", "part = 'TB'\n" ]
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Condition", "Assign'", "Condition", "Assign'", "Assign'", "Return'", "Assign'" ]
[ "from osv import fields, osv\n", "from tools.translate import _\n", "VAR_0 = 'product.product'\n", "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...
[ "from osv import fields, osv\n", "from tools.translate import _\n", "_inherit = 'product.product'\n", "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(...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "ImportFrom'", "ImportFrom'", "Assign'", "FunctionDef'", "Docstring", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_5(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_16 = self.describe()\n", "self.start_time = time.time()\n", "self.response = self.browser.do_request(self.url, self.data, self.files)\n", "self.exception_data = traceback.format_exc()\n", "self.outcome = None\n", "self.stop_time = time.time()\n...
[ "def _execute(self):...\n", "\"\"\"docstring\"\"\"\n", "description = self.describe()\n", "self.start_time = time.time()\n", "self.response = self.browser.do_request(self.url, self.data, self.files)\n", "self.exception_data = traceback.format_exc()\n", "self.outcome = None\n", "self.stop_time = time.t...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Condition", "Expr'", "Condition", "Condition", "Condition", "Ass...
[ "def FUNC_2(VAR_87):...\n", "return map(self._rules.__getitem__, filter(self.is_rule, VAR_87))\n" ]
[ "def rules(items):...\n", "return map(self._rules.__getitem__, filter(self.is_rule, items))\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "VAR_18 = self.common.create_volume(VAR_6)\n", "self.common.client_logout()\n", "return {'metadata': VAR_18}\n" ]
[ "@utils.synchronized('3par', external=True)...\n", "self.common.client_login()\n", "metadata = self.common.create_volume(volume)\n", "self.common.client_logout()\n", "return {'metadata': metadata}\n" ]
[ 0, 0, 0, 0, 0 ]
[ "Condition", "Expr'", "Assign'", "Expr'", "Return'" ]
[ "def FUNC_6(self, VAR_11, VAR_52=None):...\n", "if VAR_52 is None and not isinstance(VAR_101.site, FakeSubreddit):\n", "VAR_52 = VAR_101.site\n", "if VAR_52:\n", "if not VAR_11:\n", "VAR_52 = None\n", "VAR_52 = Subreddit._by_name(VAR_52)\n", "VAR_101.errors.add(errors.SUBREDDIT_NOEXIST)\n", "return ...
[ "def run(self, url, sr=None):...\n", "if sr is None and not isinstance(c.site, FakeSubreddit):\n", "sr = c.site\n", "if sr:\n", "if not url:\n", "sr = None\n", "sr = Subreddit._by_name(sr)\n", "c.errors.add(errors.SUBREDDIT_NOEXIST)\n", "return self.error(errors.NO_URL)\n", "url = utils.sanitize_u...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Expr'", "Return'", "Assign'", "Assign'", "Condition", "Return'", "Condition", "Assign'", "Return'", "Return'", "Expr'", "Return'" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "if VAR_21.USE_OPENID:\n", "VAR_52 = FUNC_3\n", "VAR_52 = FUNC_2\n", "return FUNC_4, VAR_52, FUNC_5\n" ]
[ "@classmethod...\n", "\"\"\"docstring\"\"\"\n", "if conf.USE_OPENID:\n", "cookie_auth = openid_cookie_authentication\n", "cookie_auth = gae_cookie_authentication\n", "return oauth_authentication, cookie_auth, service_to_service_authentication\n" ]
[ 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_6(self):...\n", "\"\"\"docstring\"\"\"\n", "VAR_11 = []\n", "for user in self.company.employees:\n", "VAR_12 = 'view.%s' % self.type_, 'view.file', 'add.file', 'edit.file'\n", "return VAR_11\n", "if self.status in ('draft', 'invalid'):\n", "VAR_12 += ('edit.%s' % self.type_, 'wait.%s' % self...
[ "def _get_user_status_acl(self):...\n", "\"\"\"docstring\"\"\"\n", "acl = []\n", "for user in self.company.employees:\n", "perms = 'view.%s' % self.type_, 'view.file', 'add.file', 'edit.file'\n", "return acl\n", "if self.status in ('draft', 'invalid'):\n", "perms += ('edit.%s' % self.type_, 'wait.%s' ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "For", "Assign'", "Return'", "Condition", "AugAssign'", "Condition", "AugAssign'", "Expr'" ]
[ "def FUNC_58(self):...\n", "VAR_2 = {'SEVERITY': {}, 'CONFIDENCE': {}}\n", "self.check_example('nosec.py', VAR_2)\n" ]
[ "def test_nosec(self):...\n", "expect = {'SEVERITY': {}, 'CONFIDENCE': {}}\n", "self.check_example('nosec.py', expect)\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'" ]
[ "def FUNC_1(self):...\n", "return 'check user_test %s' % self.user_test_id\n" ]
[ "def describe(self):...\n", "return 'check user_test %s' % self.user_test_id\n" ]
[ 0, 0 ]
[ "FunctionDef'", "Return'" ]
[ "def FUNC_9(self):...\n", "VAR_4 = '/api/apps'\n", "VAR_5 = self.client.post(VAR_4)\n", "self.assertEqual(VAR_5.status_code, 201)\n", "VAR_6 = VAR_5.data['id']\n", "VAR_4 = '/api/apps/{app_id}/builds'.format(**locals())\n", "VAR_8 = {'image': 'autotest/example', 'sha': 'a' * 40, 'procfile': json.\n d...
[ "def test_container_command_format(self):...\n", "url = '/api/apps'\n", "response = self.client.post(url)\n", "self.assertEqual(response.status_code, 201)\n", "app_id = response.data['id']\n", "url = '/api/apps/{app_id}/builds'.format(**locals())\n", "body = {'image': 'autotest/example', 'sha': 'a' * 40...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Assign'", "Expr'", "Assign'", "Assign'", "Expr'", "Expr'", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_3(self, VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "VAR_7 = logging.getLogger(__name__)\n", "VAR_7.debug('Added subscriber')\n", "self.subscribed_queues.append(VAR_6)\n" ]
[ "def add_subscriber(self, queue):...\n", "\"\"\"docstring\"\"\"\n", "logger = logging.getLogger(__name__)\n", "logger.debug('Added subscriber')\n", "self.subscribed_queues.append(queue)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Assign'", "Expr'", "Expr'" ]
[ "@staticmethod...\n", "return CLASS_0._TalkToHandlerAsync(VAR_9, VAR_7, 'POST', VAR_10)\n" ]
[ "@staticmethod...\n", "return BaseRequest._TalkToHandlerAsync(data, handler, 'POST', timeout)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "@auth.require(acl.is_bot)...\n", "self.response.headers['Content-Type'] = 'text/x-python'\n", "self.response.headers['Content-Disposition'\n ] = 'attachment; filename=\"swarming_bot_bootstrap.py\"'\n", "self.response.out.write(bot_code.get_bootstrap(self.request.host_url).content)\n" ]
[ "@auth.require(acl.is_bot)...\n", "self.response.headers['Content-Type'] = 'text/x-python'\n", "self.response.headers['Content-Disposition'\n ] = 'attachment; filename=\"swarming_bot_bootstrap.py\"'\n", "self.response.out.write(bot_code.get_bootstrap(self.request.host_url).content)\n" ]
[ 0, 0, 0, 0 ]
[ "Condition", "Assign'", "Assign'", "Expr'" ]
[ "def FUNC_8(self):...\n", "VAR_12 = traversal.TraversalPath.parse('level2s[b].level3s[4]')\n", "self.assertRaises(IndexError, VAR_12.get_value, VAR_0)\n", "VAR_12 = traversal.TraversalPath.parse('level2s[b].level3s_sd[1]')\n", "self.assertRaises(KeyError, VAR_12.get_value, VAR_0)\n" ]
[ "def test_invalid_path(self):...\n", "path = traversal.TraversalPath.parse('level2s[b].level3s[4]')\n", "self.assertRaises(IndexError, path.get_value, TEST_STRUCTURE)\n", "path = traversal.TraversalPath.parse('level2s[b].level3s_sd[1]')\n", "self.assertRaises(KeyError, path.get_value, TEST_STRUCTURE)\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Expr'", "Assign'", "Expr'" ]
[ "def FUNC_0(VAR_6):...\n", "\"\"\"docstring\"\"\"\n", "FUNC_5(VAR_6)\n", "VAR_8 = FUNC_6(VAR_6)\n", "VAR_15 = FUNC_7(request.data, VAR_8)\n", "if re.search('[^a-zA-Z0-9]', VAR_15['key']):\n", "VAR_16 = FUNC_9({'key': VAR_22}, VAR_0, VAR_8)\n", "VAR_22 = open('keys/%s/%s.key' % (VAR_6, VAR_15['key']), ...
[ "def getKey(client):...\n", "\"\"\"docstring\"\"\"\n", "validateClient(client)\n", "client_pub_key = loadClientRSAKey(client)\n", "token_data = decodeRequestToken(request.data, client_pub_key)\n", "if re.search('[^a-zA-Z0-9]', token_data['key']):\n", "keytoken = packJWT({'key': requested_key}, SERVER_JW...
[ 0, 0, 0, 0, 0, 1, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "Return'" ]
[ "def FUNC_12(self, VAR_9, VAR_10=None, VAR_13=None, VAR_14=None, **VAR_7):...\n", "if self.closed:\n", "if self._adapter is not None:\n", "assert self._session is None\n", "VAR_1 = 'localhost', self._addr.port\n", "self._run_server_ex = None\n", "def FUNC_15():...\n", "self._session = self.SESSION.cre...
[ "def host_local_debugger(self, argv, script=None, env=None, cwd=None, **kwargs):...\n", "if self.closed:\n", "if self._adapter is not None:\n", "assert self._session is None\n", "addr = 'localhost', self._addr.port\n", "self._run_server_ex = None\n", "def run():...\n", "self._session = self.SESSION.cr...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Condition", "Condition", "Assert'", "Assign'", "Assign'", "FunctionDef'", "Assign'", "Assign'", "Assign'", "Expr'", "FunctionDef'", "Expr'", "Condition", "Expr'", "Condition", "Assign'", "Expr'", "Condition", "Return'", "Assign'" ]
[ "@api.multi...\n", "\"\"\"docstring\"\"\"\n", "for VAR_12 in self:\n", "VAR_31 = self.closest_invoice_line(VAR_12, datetime.today().strftime(\n '%Y-%m-%d'))\n", "VAR_32 = 0\n", "if VAR_31 and VAR_31.price_unit:\n", "VAR_32 = VAR_31.price_unit\n", "VAR_12.system_cost = VAR_32\n", "VAR_32 *= 1 - VA...
[ "@api.multi...\n", "\"\"\"docstring\"\"\"\n", "for prod in self:\n", "invoice_line = self.closest_invoice_line(prod, datetime.today().strftime(\n '%Y-%m-%d'))\n", "invoice_price = 0\n", "if invoice_line and invoice_line.price_unit:\n", "invoice_price = invoice_line.price_unit\n", "prod.system_cost ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "Condition", "Docstring", "For", "Assign'", "Assign'", "Condition", "Assign'", "Assign'", "AugAssign'", "Expr'", "AugAssign'", "Condition", "AugAssign'" ]
[ "def FUNC_16(self, **VAR_17):...\n", "\"\"\"docstring\"\"\"\n", "self.set_defaults(**kwargs)\n", "for VAR_42, VAR_3 in VAR_17.items():\n", "self.overridable[VAR_42] = VAR_3\n" ]
[ "def set_params(self, **kwargs):...\n", "\"\"\"docstring\"\"\"\n", "self.set_defaults(**kwargs)\n", "for k, v in kwargs.items():\n", "self.overridable[k] = v\n" ]
[ 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Expr'", "For", "Assign'" ]
[ "def FUNC_9(self, VAR_14):...\n", "" ]
[ "def is_string(self, col_name):...\n", "" ]
[ 0, 0 ]
[ "FunctionDef'", "Condition" ]
[ "def FUNC_39(VAR_101):...\n", "VAR_101.input = VAR_69, VAR_70\n", "return VAR_101\n" ]
[ "def decorate(ruleinfo):...\n", "ruleinfo.input = paths, kwpaths\n", "return ruleinfo\n" ]
[ 0, 0, 0 ]
[ "FunctionDef'", "Assign'", "Return'" ]
[ "@VAR_0.route('/table_detection')...\n", "return render_template('table_detection.html', wait=WAIT_AFTER_CRAWLING)\n" ]
[ "@app.route('/table_detection')...\n", "return render_template('table_detection.html', wait=WAIT_AFTER_CRAWLING)\n" ]
[ 0, 0 ]
[ "Condition", "Return'" ]
[ "def FUNC_7(self, VAR_21, VAR_23=True):...\n", "\"\"\"docstring\"\"\"\n", "if VAR_21 == '/':\n", "return self.fs\n", "VAR_55 = VAR_21.strip('/').split('/')\n", "VAR_22 = ''\n", "VAR_57 = self.fs\n", "for VAR_66 in VAR_55:\n", "if VAR_66 not in [x[VAR_1] for x in VAR_57[VAR_8]]:\n", "return VAR_57\...
[ "def getfile(self, path, follow_symlinks=True):...\n", "\"\"\"docstring\"\"\"\n", "if path == '/':\n", "return self.fs\n", "pieces = path.strip('/').split('/')\n", "cwd = ''\n", "p = self.fs\n", "for piece in pieces:\n", "if piece not in [x[A_NAME] for x in p[A_CONTENTS]]:\n", "return p\n", "ret...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ "FunctionDef'", "Docstring", "Condition", "Return'", "Assign'", "Assign'", "Assign'", "For", "For", "Return'", "Return'", "For", "Condition", "Assign'", "Condition", "Assign'", "Condition", "Condition", "Assign'", "Assign'", "Assign'", "Condition", "Return'" ]