project_name string | class_name string | class_modifiers string | class_implements int64 | class_extends int64 | function_name string | function_body string | cyclomatic_complexity int64 | NLOC int64 | num_parameter int64 | num_token int64 | num_variable int64 | start_line int64 | end_line int64 | function_index int64 | function_params string | function_variable string | function_return_type string | function_body_line_type string | function_num_functions int64 | function_num_lines int64 | outgoing_function_count int64 | outgoing_function_names string | incoming_function_count int64 | incoming_function_names string | lexical_representation string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pasteorg_paste | environ_getter | public | 0 | 0 | __repr__ | def __repr__(self):"""Show important attributes of the WSGIRequest"""pf = pformatmsg = '<%s.%s object at 0x%x method=%s,' % \(self.__class__.__module__, self.__class__.__name__, id(self), pf(self.method))msg += '\nscheme=%s, host=%s, script_name=%s, path_info=%s,' % \(pf(self.scheme), pf(self.host), pf(self.script_name... | 2 | 16 | 1 | 139 | 0 | 272 | 288 | 272 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 29 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_app_py.AppTestCase.test_ref", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.schema_py.Array.__repr__", "_.content.gdrive.MyDrive.Phd... | The function (__repr__) defined within the public class called environ_getter.The function start at line 272 and ends at 288. It contains 16 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It has 29.0 functions calling this function whi... |
pasteorg_paste | environ_getter | public | 0 | 0 | __init__ | def __init__(self, content=b'', mimetype=None, code=200):self._iter = Noneself._is_str_iter = Trueself.content = contentself.headers = HeaderDict()self.cookies = SimpleCookie()self.status_code = codedefaults = self.defaults._current_obj()if not mimetype:mimetype = defaults.get('content_type', 'text/html')charset = defa... | 3 | 16 | 4 | 131 | 0 | 302 | 319 | 302 | self,key,default,default_factory | [] | None | {"Assign": 3} | 0 | 4 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called environ_getter.The function start at line 302 and ends at 319. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [302.0] and does not return any value. It has 6814.0 functions calling this function w... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | __str__ | def __str__(self):"""Returns a rendition of the full HTTP message, including headers.When the content is an iterator, the actual content is replaced with theoutput of str(iterator) (to avoid exhausting the iterator)."""if self._is_str_iter:content = ''.join(self.get_content())else:content = str(self.content)return '\n'... | 3 | 8 | 1 | 65 | 0 | 321 | 333 | 321 | self | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 5 | 13 | 5 | ["join", "self.get_content", "str", "join", "self.headers.headeritems"] | 64 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.ipam_py.Vlans.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectSession.__str__", "_.content.gdrive.MyDrive.... | The function (__str__) defined within the public class called WSGIResponse.The function start at line 321 and ends at 333. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 5.0 functions, It has 5.0 functions cal... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):"""Convenience call to return output and set status informationConforms to the WSGI interface for calling purposes only.Example usage:.. code-block:: pythondef wsgi_app(environ, start_response):response = WSGIResponse()response.write("Hello world")response.headers['Content-Ty... | 5 | 13 | 3 | 124 | 0 | 335 | 362 | 335 | self,environ,start_response | [] | Returns | {"Assign": 4, "Expr": 3, "For": 1, "If": 2, "Return": 3} | 9 | 28 | 9 | ["self.headers.headeritems", "self.cookies.values", "response_headers.append", "c.output", "start_response", "hasattr", "iter", "self.content.read", "self.get_content"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called WSGIResponse.The function start at line 335 and ends at 362. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [335.0], and this function return a value. It declares 9.0 functions, It has 9.0 functio... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | determine_charset | def determine_charset(self):"""Determine the encoding as specified by the Content-Type's charsetparameter, if one is set"""charset_match = _CHARSET_RE.search(self.headers.get('Content-Type', ''))if charset_match:return charset_match.group(1) | 2 | 4 | 1 | 33 | 0 | 364 | 371 | 364 | self | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 3 | 8 | 3 | ["_CHARSET_RE.search", "self.headers.get", "charset_match.group"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3715078_transifex_transifex_client.txclib.utils_py.parse_tx_response"] | The function (determine_charset) defined within the public class called WSGIResponse.The function start at line 364 and ends at 371. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 fun... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | has_header | def has_header(self, header):"""Case-insensitive check for a header"""warnings.warn('WSGIResponse.has_header is deprecated, use ''WSGIResponse.headers.has_key instead', DeprecationWarning,2)return self.headers.has_key(header) | 1 | 5 | 2 | 28 | 0 | 373 | 380 | 373 | self,header | [] | Returns | {"Expr": 2, "Return": 1} | 2 | 8 | 2 | ["warnings.warn", "self.headers.has_key"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94636089_recurve_methods_flexvalue.flexvalue.db_py.DBManager._csv_file_to_dicts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94636089_recurve_methods_flexvalue.flexvalue.db_py.DBManager._csv_file_to_rows", "_.con... | The function (has_header) defined within the public class called WSGIResponse.The function start at line 373 and ends at 380. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [373.0], and this function return a value. It declares 2.0 functions, It has 2.0 functi... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | set_cookie | def set_cookie(self, key, value='', max_age=None, expires=None, path='/', domain=None, secure=None, httponly=None):"""Define a cookie to be sent via the outgoing HTTP headers"""self.cookies[key] = valuefor var_name, var_value in [('max_age', max_age), ('path', path), ('domain', domain),('secure', secure), ('expires', e... | 4 | 8 | 9 | 116 | 0 | 382 | 392 | 382 | self,key,value,max_age,expires,path,domain,secure,httponly | [] | None | {"Assign": 2, "Expr": 1, "For": 1, "If": 1} | 1 | 11 | 1 | ["var_name.replace"] | 0 | [] | The function (set_cookie) defined within the public class called WSGIResponse.The function start at line 382 and ends at 392. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 9 parameters, represented as [382.0] and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | delete_cookie | def delete_cookie(self, key, path='/', domain=None):"""Notify the browser the specified cookie has expired and should bedeleted (via the outgoing HTTP headers)"""self.cookies[key] = ''if path is not None:self.cookies[key]['path'] = pathif domain is not None:self.cookies[key]['domain'] = domainself.cookies[key]['expires... | 3 | 8 | 4 | 80 | 0 | 394 | 405 | 394 | self,key,path,domain | [] | None | {"Assign": 5, "Expr": 1, "If": 2} | 0 | 12 | 0 | [] | 0 | [] | The function (delete_cookie) defined within the public class called WSGIResponse.The function start at line 394 and ends at 405. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [394.0] and does not return any value.. |
pasteorg_paste | WSGIResponse | public | 0 | 0 | _set_content | def _set_content(self, content):if not isinstance(content, (bytes, str)):self._iter = contentif isinstance(content, list):self._is_str_iter = Trueelse:self._is_str_iter = Falseelse:self._iter = [content]self._is_str_iter = True | 3 | 10 | 2 | 59 | 0 | 407 | 416 | 407 | self,content | [] | None | {"Assign": 5, "If": 2} | 2 | 10 | 2 | ["isinstance", "isinstance"] | 0 | [] | The function (_set_content) defined within the public class called WSGIResponse.The function start at line 407 and ends at 416. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [407.0] and does not return any value. It declares 2.0 functions, and It has 2.0 fu... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | get_content | def get_content(self):"""Returns the content as an iterable of strings, encoding each element ofthe iterator from a Unicode object if necessary."""charset = self.determine_charset()if charset:return encode_unicode_app_iter(self.content, charset, self.errors)else:return self.content | 2 | 6 | 1 | 35 | 0 | 423 | 432 | 423 | self | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 2} | 2 | 10 | 2 | ["self.determine_charset", "encode_unicode_app_iter"] | 103 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3513788_docker_archive_docker_registry.docker_registry.drivers.s3_py.Storage.get_content", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_py.bookmark", "_.content... | The function (get_content) defined within the public class called WSGIResponse.The function start at line 423 and ends at 432. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | wsgi_response | def wsgi_response(self):"""Return this WSGIResponse as a tuple of WSGI formatted data, including:(status, headers, iterable)"""status_text = STATUS_CODE_TEXT[self.status_code]status = '%s %s' % (self.status_code, status_text)response_headers = self.headers.headeritems()for c in self.cookies.values():response_headers.ap... | 2 | 7 | 1 | 72 | 0 | 434 | 444 | 434 | self | [] | Returns | {"Assign": 3, "Expr": 2, "For": 1, "Return": 1} | 5 | 11 | 5 | ["self.headers.headeritems", "self.cookies.values", "response_headers.append", "c.output", "self.get_content"] | 0 | [] | The function (wsgi_response) defined within the public class called WSGIResponse.The function start at line 434 and ends at 444. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 5.0 functions, and It has 5.0 fu... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | write | def write(self, content):if not self._is_str_iter:raise IOError("This %s instance's content is not writable: (content "'is an iterator)' % self.__class__.__name__)self.content.append(content) | 2 | 5 | 2 | 33 | 0 | 448 | 452 | 448 | self,content | [] | None | {"Expr": 1, "If": 1} | 2 | 5 | 2 | ["IOError", "self.content.append"] | 501 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.tests.gen_pickles_py.generate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3510604_dieseldev_diesel.examples.crawler_py.write_file", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creatio... | The function (write) defined within the public class called WSGIResponse.The function start at line 448 and ends at 452. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [448.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions calle... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | flush | def flush(self):pass | 1 | 2 | 1 | 6 | 0 | 454 | 455 | 454 | self | [] | None | {} | 0 | 2 | 0 | [] | 9 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625987_abdur_rahmaanj_honeybot.honeybot.plugins.poker_assets.best5_py.hand_rank", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675065_rouxrc_gazouilleur.gazouilleur.lib.filelogger_py.FileLogger.close", "_.content... | The function (flush) defined within the public class called WSGIResponse.The function start at line 454 and ends at 455. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 9.0 functions calling this function which are ["_.... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | tell | def tell(self):if not self._is_str_iter:raise IOError('This %s instance cannot tell its position: (content ''is an iterator)' % self.__class__.__name__)return sum([len(chunk) for chunk in self._iter]) | 3 | 5 | 1 | 39 | 0 | 457 | 461 | 457 | self | [] | Returns | {"If": 1, "Return": 1} | 3 | 5 | 3 | ["IOError", "sum", "len"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.client._producers_py.FileBodyProducer._determineLength", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87138903_intel_bmap_tools.bmaptools.TransRead_py.TransRead.tell", "_.content.gdrive.... | The function (tell) defined within the public class called WSGIResponse.The function start at line 457 and ends at 461. It contains 5 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions called... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | charset__get | def charset__get(self):"""Get/set the charset (in the Content-Type)"""header = self.headers.get('content-type')if not header:return Nonematch = _CHARSET_RE.search(header)if match:return match.group(1)return None | 3 | 8 | 1 | 42 | 0 | 466 | 476 | 466 | self | [] | Returns | {"Assign": 2, "Expr": 1, "If": 2, "Return": 3} | 3 | 11 | 3 | ["self.headers.get", "_CHARSET_RE.search", "match.group"] | 0 | [] | The function (charset__get) defined within the public class called WSGIResponse.The function start at line 466 and ends at 476. It contains 8 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 fun... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | charset__set | def charset__set(self, charset):if charset is None:del self.charsetreturntry:header = self.headers.pop('content-type')except KeyError:raise AttributeError("You cannot set the charset when no content-type is defined")match = _CHARSET_RE.search(header)if match:header = header[:match.start()] + header[match.end():]header ... | 4 | 14 | 2 | 82 | 0 | 478 | 491 | 478 | self,charset | [] | None | {"Assign": 4, "AugAssign": 1, "If": 2, "Return": 1, "Try": 1} | 5 | 14 | 5 | ["self.headers.pop", "AttributeError", "_CHARSET_RE.search", "match.start", "match.end"] | 0 | [] | The function (charset__set) defined within the public class called WSGIResponse.The function start at line 478 and ends at 491. It contains 14 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [478.0] and does not return any value. It declares 5.0 functions, and It has 5.0 fu... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | charset__del | def charset__del(self):try:header = self.headers.pop('content-type')except KeyError:# Don't need to remove anythingreturnmatch = _CHARSET_RE.search(header)if match:header = header[:match.start()] + header[match.end():]self.headers['content-type'] = header | 3 | 9 | 1 | 61 | 0 | 493 | 502 | 493 | self | [] | None | {"Assign": 4, "If": 1, "Return": 1, "Try": 1} | 4 | 10 | 4 | ["self.headers.pop", "_CHARSET_RE.search", "match.start", "match.end"] | 0 | [] | The function (charset__del) defined within the public class called WSGIResponse.The function start at line 493 and ends at 502. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has 4.0 functio... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | content_type__get | def content_type__get(self):"""Get/set the Content-Type header (or None), *without* thecharset or any parameters.If you include parameters (or ``;`` at all) when setting thecontent_type, any existing parameters will be deleted;otherwise they will be preserved."""header = self.headers.get('content-type')if not header:re... | 2 | 5 | 1 | 34 | 0 | 506 | 518 | 506 | self | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 2} | 2 | 13 | 2 | ["self.headers.get", "header.split"] | 0 | [] | The function (content_type__get) defined within the public class called WSGIResponse.The function start at line 506 and ends at 518. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | content_type__set | def content_type__set(self, value):if ';' not in value:header = self.headers.get('content-type', '')if ';' in header:params = header.split(';', 1)[1]value += ';' + paramsself.headers['content-type'] = value | 3 | 7 | 2 | 56 | 0 | 520 | 526 | 520 | self,value | [] | None | {"Assign": 3, "AugAssign": 1, "If": 2} | 2 | 7 | 2 | ["self.headers.get", "header.split"] | 0 | [] | The function (content_type__set) defined within the public class called WSGIResponse.The function start at line 520 and ends at 526. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [520.0] and does not return any value. It declares 2.0 functions, and It has 2.... |
pasteorg_paste | WSGIResponse | public | 0 | 0 | content_type__del | def content_type__del(self):try:del self.headers['content-type']except KeyError:pass | 2 | 5 | 1 | 18 | 0 | 528 | 532 | 528 | self | [] | None | {"Try": 1} | 0 | 5 | 0 | [] | 0 | [] | The function (content_type__del) defined within the public class called WSGIResponse.The function start at line 528 and ends at 532. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value.. |
pasteorg_paste | AuthTicket | public | 0 | 0 | __init__ | def __init__(self, secret, userid, ip, tokens=(), user_data='', time=None, cookie_name='auth_tkt', secure=False, digest_algo=DEFAULT_DIGEST): | 1 | 3 | 5 | 36 | 0 | 92 | 94 | 92 | self,secret,userid,ip,tokens,user_data,time,cookie_name,secure,digest_algo | [] | None | {"Assign": 12, "If": 3} | 5 | 21 | 5 | ["isinstance", "join", "time_mod.time", "isinstance", "getattr"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthTicket.The function start at line 92 and ends at 94. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [92.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions called ... |
pasteorg_paste | AuthTicket | public | 0 | 0 | digest | def digest(self):return calculate_digest(self.ip, self.time, self.secret, self.userid, self.tokens,self.user_data, self.digest_algo) | 1 | 4 | 1 | 36 | 0 | 114 | 117 | 114 | self | [] | Returns | {"Return": 1} | 1 | 4 | 1 | ["calculate_digest"] | 63 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.ssh.kex_gex_py.KexGex._parse_kexdh_gex_init", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.ssh.kex_gex_py.KexGex._parse_kexdh_gex_reply", "_.content.gdrive.MyDrive.Phd_... | The function (digest) defined within the public class called AuthTicket.The function start at line 114 and ends at 117. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | AuthTicket | public | 0 | 0 | cookie_value | def cookie_value(self):v = b'%s%08x%s!' % (self.digest(), int(self.time), maybe_encode(url_quote(self.userid)))if self.tokens:v += maybe_encode(self.tokens) + b'!'v += maybe_encode(self.user_data)return v | 2 | 6 | 1 | 60 | 0 | 119 | 124 | 119 | self | [] | Returns | {"Assign": 1, "AugAssign": 2, "If": 1, "Return": 1} | 6 | 6 | 6 | ["self.digest", "int", "maybe_encode", "url_quote", "maybe_encode", "maybe_encode"] | 0 | [] | The function (cookie_value) defined within the public class called AuthTicket.The function start at line 119 and ends at 124. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 6.0 functions, and It has 6.0 funct... |
pasteorg_paste | AuthTicket | public | 0 | 0 | cookie | def cookie(self):c = SimpleCookie()import base64cookie_value = base64.b64encode(self.cookie_value())c[self.cookie_name] = cookie_valuec[self.cookie_name]['path'] = '/'if self.secure:c[self.cookie_name]['secure'] = 'true'return c | 2 | 9 | 1 | 61 | 0 | 126 | 134 | 126 | self | [] | Returns | {"Assign": 5, "If": 1, "Return": 1} | 3 | 9 | 3 | ["SimpleCookie", "base64.b64encode", "self.cookie_value"] | 0 | [] | The function (cookie) defined within the public class called AuthTicket.The function start at line 126 and ends at 134. It contains 9 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functions c... |
pasteorg_paste | AuthTicket | public | 0 | 0 | __init__ | def __init__(self, msg, expected=None):self.expected = expectedException.__init__(self, msg) | 1 | 3 | 3 | 24 | 0 | 144 | 146 | 144 | self,secret,userid,ip,tokens,user_data,time,cookie_name,secure,digest_algo | [] | None | {"Assign": 12, "If": 3} | 5 | 21 | 5 | ["isinstance", "join", "time_mod.time", "isinstance", "getattr"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthTicket.The function start at line 144 and ends at 146. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [144.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | parse_ticket | def parse_ticket(secret, ticket, ip, digest_algo=DEFAULT_DIGEST):"""Parse the ticket, returning (timestamp, userid, tokens, user_data).If the ticket cannot be parsed, ``BadTicket`` will be raised withan explanation."""if isinstance(digest_algo, bytes):# correct specification of digest from hashlib or faildigest_algo = ... | 6 | 28 | 4 | 206 | 9 | 149 | 188 | 149 | secret,ticket,ip,digest_algo | ['timestamp', 'digest', 'digest_algo', 'tokens', 'userid', 'expected', 'user_data', 'ticket', 'digest_hexa_size'] | Returns | {"Assign": 12, "Expr": 1, "If": 3, "Return": 1, "Try": 2} | 14 | 40 | 14 | ["isinstance", "getattr", "digest_algo", "ticket.strip", "int", "BadTicket", "split", "BadTicket", "url_unquote", "userid.decode", "data.split", "calculate_digest", "BadTicket", "tokens.split"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.auth_tkt_py.AuthTKTMiddleware.__call__"] | The function (parse_ticket) defined within the public class called public.The function start at line 149 and ends at 188. It contains 28 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [149.0], and this function return a value. It declares 14.0 functions, It has 14.0 functio... |
pasteorg_paste | public | public | 0 | 0 | calculate_digest | def calculate_digest(ip, timestamp, secret, userid, tokens, user_data, digest_algo):secret = maybe_encode(secret)userid = maybe_encode(userid)tokens = maybe_encode(tokens)user_data = maybe_encode(user_data)digest0 = maybe_encode(digest_algo(encode_ip_timestamp(ip, timestamp) + secret + userid + b'\0'+ tokens + b'\0' + ... | 1 | 11 | 7 | 90 | 6 | 192 | 202 | 192 | ip,timestamp,secret,userid,tokens,user_data,digest_algo | ['digest', 'secret', 'tokens', 'userid', 'user_data', 'digest0'] | Returns | {"Assign": 6, "Return": 1} | 11 | 11 | 11 | ["maybe_encode", "maybe_encode", "maybe_encode", "maybe_encode", "maybe_encode", "hexdigest", "digest_algo", "encode_ip_timestamp", "hexdigest", "digest_algo", "maybe_encode"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.auth_tkt_py.AuthTicket.digest", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.auth_tkt_py.parse_ticket"] | The function (calculate_digest) defined within the public class called public.The function start at line 192 and ends at 202. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [192.0], and this function return a value. It declares 11.0 functions, It has 11.0 fun... |
pasteorg_paste | public | public | 0 | 0 | int2byte | def int2byte(i):return bytes((i,)) | 1 | 2 | 1 | 13 | 0 | 204 | 205 | 204 | i | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["bytes"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3591075_smarkets_smk_python_sdk.smarkets.streaming_api.framing_py.uleb128_encode"] | The function (int2byte) defined within the public class called public.The function start at line 204 and ends at 205. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called insi... |
pasteorg_paste | public | public | 0 | 0 | encode_ip_timestamp | def encode_ip_timestamp(ip, timestamp):ip_chars = b''.join(map(int2byte, map(int, ip.split('.'))))t = int(timestamp)ts = ((t & 0xff000000) >> 24,(t & 0xff0000) >> 16,(t & 0xff00) >> 8,t & 0xff)ts_chars = b''.join(map(int2byte, ts))return (ip_chars + ts_chars) | 1 | 9 | 2 | 91 | 4 | 207 | 215 | 207 | ip,timestamp | ['t', 'ip_chars', 'ts_chars', 'ts'] | Returns | {"Assign": 4, "Return": 1} | 7 | 9 | 7 | ["join", "map", "map", "ip.split", "int", "join", "map"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.auth_tkt_py.calculate_digest"] | The function (encode_ip_timestamp) defined within the public class called public.The function start at line 207 and ends at 215. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [207.0], and this function return a value. It declares 7.0 functions, It has 7.0 fun... |
pasteorg_paste | public | public | 0 | 0 | maybe_encode | def maybe_encode(s, encoding='utf8'):if isinstance(s, str):s = s.encode(encoding)return s | 2 | 4 | 2 | 27 | 1 | 218 | 221 | 218 | s,encoding | ['s'] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 2 | 4 | 2 | ["isinstance", "s.encode"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.auth_tkt_py.AuthTicket.cookie_value", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.auth_tkt_py.calculate_digest"] | The function (maybe_encode) defined within the public class called public.The function start at line 218 and ends at 221. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [218.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions ... |
pasteorg_paste | AuthTicket | public | 0 | 0 | __init__ | def __init__(self, app, secret, cookie_name='auth_tkt', secure=False, include_ip=True, logout_path=None, httponly=False, no_domain_cookie=True, current_domain_cookie=True, wildcard_cookie=True, digest_algo=DEFAULT_DIGEST):self.app = appself.secret = secretself.cookie_name = cookie_nameself.secure = secureself.httponly ... | 2 | 18 | 12 | 120 | 0 | 282 | 300 | 282 | self,secret,userid,ip,tokens,user_data,time,cookie_name,secure,digest_algo | [] | None | {"Assign": 12, "If": 3} | 5 | 21 | 5 | ["isinstance", "join", "time_mod.time", "isinstance", "getattr"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthTicket.The function start at line 282 and ends at 300. It contains 18 lines of code and it has a cyclomatic complexity of 2. It takes 12 parameters, represented as [282.0] and does not return any value. It declares 5.0 functions, It has 5.0 functions ca... |
pasteorg_paste | public | public | 0 | 0 | __call__.set_user | def set_user(userid, tokens='', user_data=''):set_cookies.extend(self.set_user_cookie(environ, userid, tokens, user_data)) | 1 | 3 | 3 | 30 | 0 | 334 | 336 | 334 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.set_user) defined within the public class called public.The function start at line 334 and ends at 336. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [334.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __call__.logout_user | def logout_user():set_cookies.extend(self.logout_user_cookie(environ)) | 1 | 2 | 0 | 15 | 0 | 338 | 339 | 338 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.logout_user) defined within the public class called public.The function start at line 338 and ends at 339. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __call__.cookie_setting_start_response | def cookie_setting_start_response(status, headers, exc_info=None):headers.extend(set_cookies)return start_response(status, headers, exc_info) | 1 | 3 | 3 | 26 | 0 | 346 | 348 | 346 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.cookie_setting_start_response) defined within the public class called public.The function start at line 346 and ends at 348. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [346.0] and does not return any value.. |
pasteorg_paste | AuthTKTMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):cookies = request.get_cookies(environ)if self.cookie_name in cookies:cookie_value = cookies[self.cookie_name].valueelse:cookie_value = ''if cookie_value:if self.include_ip:remote_addr = environ['REMOTE_ADDR']else:# mod_auth_tkt uses this dummy value when IP is not# checked:re... | 8 | 32 | 3 | 186 | 0 | 302 | 350 | 302 | self,environ,start_response | [] | Returns | {"Assign": 15, "Expr": 4, "If": 5, "Return": 2, "Try": 1} | 13 | 49 | 13 | ["request.get_cookies", "parse_ticket", "join", "environ.get", "set_cookies.extend", "self.set_user_cookie", "set_cookies.extend", "self.logout_user_cookie", "environ.get", "logout_user", "headers.extend", "start_response", "self.app"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called AuthTKTMiddleware.The function start at line 302 and ends at 350. It contains 32 lines of code and it has a cyclomatic complexity of 8. It takes 3 parameters, represented as [302.0], and this function return a value. It declares 13.0 functions, It has 13.0 ... |
pasteorg_paste | AuthTKTMiddleware | public | 0 | 0 | set_user_cookie | def set_user_cookie(self, environ, userid, tokens, user_data):if not isinstance(tokens, str):tokens = ','.join(tokens)if self.include_ip:remote_addr = environ['REMOTE_ADDR']else:remote_addr = '0.0.0.0'ticket = AuthTicket(self.secret,userid,remote_addr,tokens=tokens,user_data=user_data,cookie_name=self.cookie_name,secur... | 8 | 35 | 5 | 214 | 0 | 352 | 391 | 352 | self,environ,userid,tokens,user_data | [] | Returns | {"Assign": 8, "AugAssign": 2, "Expr": 3, "If": 7, "Return": 1} | 11 | 40 | 11 | ["isinstance", "join", "AuthTicket", "environ.get", "environ.get", "cookies.append", "ticket.cookie_value", "cookies.append", "ticket.cookie_value", "cookies.append", "ticket.cookie_value"] | 0 | [] | The function (set_user_cookie) defined within the public class called AuthTKTMiddleware.The function start at line 352 and ends at 391. It contains 35 lines of code and it has a cyclomatic complexity of 8. It takes 5 parameters, represented as [352.0], and this function return a value. It declares 11.0 functions, and ... |
pasteorg_paste | AuthTKTMiddleware | public | 0 | 0 | logout_user_cookie | def logout_user_cookie(self, environ):cur_domain = environ.get('HTTP_HOST', environ.get('SERVER_NAME'))wild_domain = '.' + cur_domainexpires = 'Sat, 01-Jan-2000 12:00:00 GMT'cookies = [('Set-Cookie', '%s=""; Expires="%s"; Path=/' % (self.cookie_name, expires)),('Set-Cookie', '%s=""; Expires="%s"; Path=/; Domain=%s' % (... | 1 | 12 | 2 | 82 | 0 | 393 | 404 | 393 | self,environ | [] | Returns | {"Assign": 4, "Return": 1} | 2 | 12 | 2 | ["environ.get", "environ.get"] | 0 | [] | The function (logout_user_cookie) defined within the public class called AuthTKTMiddleware.The function start at line 393 and ends at 404. It contains 12 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [393.0], and this function return a value. It declares 2.0 functions, and... |
pasteorg_paste | public | public | 0 | 0 | make_auth_tkt_middleware | def make_auth_tkt_middleware(app,global_conf,secret=None,cookie_name='auth_tkt',secure=False,include_ip=True,logout_path=None):"""Creates the `AuthTKTMiddleware<class-paste.auth.auth_tkt.AuthTKTMiddleware.html>`_.``secret`` is required, but can be set globally or locally."""from paste.deploy.converters import asboolsec... | 4 | 18 | 7 | 87 | 3 | 407 | 430 | 407 | app,global_conf,secret,cookie_name,secure,include_ip,logout_path | ['include_ip', 'secret', 'secure'] | Returns | {"Assign": 3, "Expr": 1, "If": 2, "Return": 1} | 5 | 24 | 5 | ["asbool", "asbool", "global_conf.get", "ValueError", "AuthTKTMiddleware"] | 0 | [] | The function (make_auth_tkt_middleware) defined within the public class called public.The function start at line 407 and ends at 430. It contains 18 lines of code and it has a cyclomatic complexity of 4. It takes 7 parameters, represented as [407.0], and this function return a value. It declares 5.0 functions, and It ... |
pasteorg_paste | AuthBasicAuthenticator | public | 0 | 0 | __init__ | def __init__(self, realm, authfunc):self.realm = realmself.authfunc = authfunc | 1 | 3 | 3 | 19 | 0 | 39 | 41 | 39 | self,realm,authfunc | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthBasicAuthenticator.The function start at line 39 and ends at 41. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [39.0] and does not return any value. It has 6814.0 functions calling this functi... |
pasteorg_paste | AuthBasicAuthenticator | public | 0 | 0 | build_authentication | def build_authentication(self):head = WWW_AUTHENTICATE.tuples('Basic realm="%s"' % self.realm)return HTTPUnauthorized(headers=head) | 1 | 3 | 1 | 24 | 0 | 43 | 45 | 43 | self | [] | Returns | {"Assign": 1, "Return": 1} | 2 | 3 | 2 | ["WWW_AUTHENTICATE.tuples", "HTTPUnauthorized"] | 0 | [] | The function (build_authentication) defined within the public class called AuthBasicAuthenticator.The function start at line 43 and ends at 45. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and... |
pasteorg_paste | AuthBasicAuthenticator | public | 0 | 0 | authenticate | def authenticate(self, environ):authorization = AUTHORIZATION(environ)if not authorization:return self.build_authentication()(authmeth, auth) = authorization.split(' ', 1)if 'basic' != authmeth.lower():return self.build_authentication()auth = b64decode(auth.strip().encode('ascii')).decode('ascii')username, password = a... | 4 | 12 | 2 | 104 | 0 | 47 | 58 | 47 | self,environ | [] | Returns | {"Assign": 4, "If": 3, "Return": 4} | 12 | 12 | 12 | ["AUTHORIZATION", "self.build_authentication", "authorization.split", "authmeth.lower", "self.build_authentication", "decode", "b64decode", "encode", "auth.strip", "auth.split", "self.authfunc", "self.build_authentication"] | 88 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectMultiSession.authenticate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676779_dj_wasabi_ansible_zabbix_agent.molecule.with_server.tests.test_agent_py.test_psk_ho... | The function (authenticate) defined within the public class called AuthBasicAuthenticator.The function start at line 47 and ends at 58. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [47.0], and this function return a value. It declares 12.0 functions, It has... |
pasteorg_paste | AuthBasicAuthenticator | public | 0 | 0 | __init__ | def __init__(self, application, realm, authfunc):self.application = applicationself.authenticate = AuthBasicAuthenticator(realm, authfunc) | 1 | 3 | 4 | 26 | 0 | 89 | 91 | 89 | self,realm,authfunc | [] | None | {"Assign": 2} | 0 | 3 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthBasicAuthenticator.The function start at line 89 and ends at 91. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [89.0] and does not return any value. It has 6814.0 functions calling this functi... |
pasteorg_paste | AuthBasicHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):username = REMOTE_USER(environ)if not username:result = self.authenticate(environ)if isinstance(result, str):AUTH_TYPE.update(environ, 'basic')REMOTE_USER.update(environ, result)else:return result.wsgi_application(environ, start_response)return self.application(environ, start... | 3 | 10 | 3 | 71 | 0 | 93 | 102 | 93 | self,environ,start_response | [] | Returns | {"Assign": 2, "Expr": 2, "If": 2, "Return": 2} | 7 | 10 | 7 | ["REMOTE_USER", "self.authenticate", "isinstance", "AUTH_TYPE.update", "REMOTE_USER.update", "result.wsgi_application", "self.application"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called AuthBasicHandler.The function start at line 93 and ends at 102. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [93.0], and this function return a value. It declares 7.0 functions, It has 7.0 funct... |
pasteorg_paste | public | public | 0 | 0 | make_basic | def make_basic(app, global_conf, realm, authfunc, **kw):"""Grant access via basic authenticationConfig looks like this::[filter:grant]use = egg:Paste#auth_basicrealm=myrealmauthfunc=somepackage.somemodule:somefunction"""from paste.util.import_string import eval_importimport typesauthfunc = eval_import(authfunc)assert i... | 1 | 6 | 5 | 51 | 1 | 108 | 124 | 108 | app,global_conf,realm,authfunc,**kw | ['authfunc'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 17 | 3 | ["eval_import", "isinstance", "AuthBasicHandler"] | 0 | [] | The function (make_basic) defined within the public class called public.The function start at line 108 and ends at 124. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [108.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functio... |
pasteorg_paste | public | public | 0 | 0 | AuthCASHandler.cas_application | def cas_application(environ, start_response):username = environ.get('REMOTE_USER','')if username:return application(environ, start_response)qs = environ.get('QUERY_STRING','').split("&")if qs and qs[-1].startswith("ticket="):# assume a response from the authorityticket = qs.pop().split("=", 1)[1]environ['QUERY_STRING']... | 5 | 24 | 2 | 201 | 0 | 63 | 87 | 63 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (AuthCASHandler.cas_application) defined within the public class called public.The function start at line 63 and ends at 87. It contains 24 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [63.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | AuthCASHandler | def AuthCASHandler(application, authority):"""middleware to implement CAS 1.0 authenticationThere are several possible outcomes:0. If the REMOTE_USER environment variable is already populated; then this middleware is a no-op, and the request is passed along to the application.1. If a query argument 'ticket' is found, t... | 2 | 4 | 2 | 26 | 9 | 32 | 88 | 32 | application,authority | ['args', 'qs', 'exce', 'username', 'service', 'requrl', 'ticket', 'location', 'result'] | Returns | {"Assign": 15, "Expr": 1, "If": 3, "Return": 4} | 21 | 57 | 21 | ["authority.endswith", "authority.startswith", "environ.get", "application", "split", "environ.get", "startswith", "split", "qs.pop", "join", "construct_url", "urlencode", "split", "read", "urlopen", "application", "CASLoginFailure", "construct_url", "urlencode", "CASAuthenticate", "exce.wsgi_application"] | 0 | [] | The function (AuthCASHandler) defined within the public class called public.The function start at line 32 and ends at 88. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [32.0], and this function return a value. It declares 21.0 functions, and It has 21.0 func... |
pasteorg_paste | public | public | 0 | 0 | make_time | def make_time(value):return time.strftime("%Y%m%d%H%M", time.gmtime(value)) | 1 | 2 | 1 | 19 | 0 | 54 | 55 | 54 | value | [] | Returns | {"Return": 1} | 2 | 2 | 2 | ["time.strftime", "time.gmtime"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.cookie_py.AuthCookieSigner.auth", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.cookie_py.AuthCookieSigner.sign"] | The function (make_time) defined within the public class called public.The function start at line 54 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions called in... |
pasteorg_paste | public | public | 0 | 0 | encode | def encode(s, sublist = _encode):return reduce((lambda a, b: a.replace(b[0], b[1])), sublist, str(s)) | 1 | 2 | 2 | 41 | 0 | 65 | 66 | 65 | s,sublist | [] | Returns | {"Return": 1} | 3 | 2 | 3 | ["reduce", "a.replace", "str"] | 942 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.feeds_py.feeds_timer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.tweets_py.get_access_token", "_.content.gdrive.MyDrive.Phd_Thesis.... | The function (encode) defined within the public class called public.The function start at line 65 and ends at 66. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [65.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called in... |
pasteorg_paste | CookieTooLarge | public | 0 | 1 | __init__ | def __init__(self, content, cookie):RuntimeError.__init__("Signed cookie exceeds maximum size of 4096")self.content = contentself.cookie = cookie | 1 | 4 | 3 | 25 | 0 | 70 | 73 | 70 | self,content,cookie | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["RuntimeError.__init__"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called CookieTooLarge, that inherit another class.The function start at line 70 and ends at 73. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [70.0] and does not return any value. It declare 1.0 function... |
pasteorg_paste | public | public | 0 | 0 | new_secret | def new_secret():""" returns a 64 byte secret """secret = ''.join(random.sample(_all_chars, 64))secret = secret.encode('utf8')return secret | 1 | 4 | 0 | 30 | 1 | 76 | 80 | 76 | ['secret'] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 3 | 5 | 3 | ["join", "random.sample", "secret.encode"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.cookie_py.AuthCookieSigner.__init__"] | The function (new_secret) defined within the public class called public.The function start at line 76 and ends at 80. It contains 4 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions called i... | |
pasteorg_paste | CookieTooLarge | public | 0 | 1 | __init__ | def __init__(self, secret = None, timeout = None, maxlen = None):self.timeout = timeout or 30if isinstance(timeout, str):raise ValueError("Timeout must be a number (minutes), not a string (%r)"% timeout)self.maxlen= maxlen or 4096self.secret = secret or new_secret() | 5 | 8 | 4 | 55 | 0 | 128 | 135 | 128 | self,content,cookie | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["RuntimeError.__init__"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called CookieTooLarge, that inherit another class.The function start at line 128 and ends at 135. It contains 8 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [128.0] and does not return any value. It declare 1.0 funct... |
pasteorg_paste | AuthCookieSigner | public | 0 | 0 | sign | def sign(self, content):"""Sign the content returning a valid cookie (that does notneed to be escaped and quoted).The expiration of thiscookie is handled server-side in the auth() function."""timestamp = make_time(time.time() + 60*self.timeout)content = content.encode('utf8')timestamp = timestamp.encode('utf8')cookie =... | 2 | 13 | 2 | 128 | 0 | 137 | 155 | 137 | self,content | [] | Returns | {"Assign": 6, "Expr": 1, "If": 1, "Return": 1} | 13 | 19 | 13 | ["make_time", "time.time", "content.encode", "timestamp.encode", "base64.encodebytes", "digest", "hmac.new", "replace", "cookie.replace", "replace", "cookie.replace", "len", "CookieTooLarge"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws._auth_v4_py.getSignatureKey", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3918097_mherrmann_fbs.fbs.builtin_commands.__init___py.release", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_C... | The function (sign) defined within the public class called AuthCookieSigner.The function start at line 137 and ends at 155. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [137.0], and this function return a value. It declares 13.0 functions, It has 13.0 funct... |
pasteorg_paste | AuthCookieSigner | public | 0 | 0 | auth | def auth(self, cookie):"""Authenticate the cooke using the signature, verify that ithas not expired; and return the cookie's content"""decode = base64.decodestring(cookie.replace("_", "/").replace("~", "="))signature = decode[:_signature_size]expires = decode[_signature_size:_header_size]content = decode[_header_size:]... | 3 | 13 | 2 | 98 | 0 | 157 | 179 | 157 | self,cookie | [] | Returns | {"Assign": 4, "Expr": 1, "If": 2, "Return": 1} | 9 | 23 | 9 | ["base64.decodestring", "replace", "cookie.replace", "digest", "hmac.new", "int", "int", "make_time", "time.time"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95163051_ansible_django_ansible_base.ansible_base.lib.channels.middleware_py._get_authenticated_user", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95163051_ansible_django_ansible_base.test_app.tests.lib.channels.t... | The function (auth) defined within the public class called AuthCookieSigner.The function start at line 157 and ends at 179. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [157.0], and this function return a value. It declares 9.0 functions, It has 9.0 functio... |
pasteorg_paste | CookieTooLarge | public | 0 | 1 | __init__ | def __init__(self, handler, scanlist):list.__init__(self, scanlist)self.handler = handler | 1 | 3 | 3 | 22 | 0 | 190 | 192 | 190 | self,content,cookie | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["RuntimeError.__init__"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called CookieTooLarge, that inherit another class.The function start at line 190 and ends at 192. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [190.0] and does not return any value. It declare 1.0 funct... |
pasteorg_paste | AuthCookieEnviron | public | 0 | 1 | append | def append(self, value):if value in self:returnlist.append(self, str(value)) | 2 | 4 | 2 | 24 | 0 | 193 | 196 | 193 | self,value | [] | None | {"Expr": 1, "If": 1, "Return": 1} | 2 | 4 | 2 | ["list.append", "str"] | 1,513 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.bot_py.Bobbit.update_user_channel", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.history_py.History.insert", "_.content.gdrive.MyDrive.Phd_Thesis.Data... | The function (append) defined within the public class called AuthCookieEnviron, that inherit another class.The function start at line 193 and ends at 196. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [193.0] and does not return any value. It declares 2.0 fun... |
pasteorg_paste | CookieTooLarge | public | 0 | 1 | __init__ | def __init__(self, application, cookie_name=None, scanlist=None, signer=None, secret=None, timeout=None, maxlen=None):if not signer:signer = self.signer_class(secret, timeout, maxlen)self.signer = signerself.scanlist = scanlist or ('REMOTE_USER','REMOTE_SESSION')self.application = applicationself.cookie_name = cookie_n... | 4 | 8 | 8 | 77 | 0 | 254 | 261 | 254 | self,content,cookie | [] | None | {"Assign": 2, "Expr": 1} | 1 | 4 | 1 | ["RuntimeError.__init__"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called CookieTooLarge, that inherit another class.The function start at line 254 and ends at 261. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 8 parameters, represented as [254.0] and does not return any value. It declare 1.0 funct... |
pasteorg_paste | public | public | 0 | 0 | __call__.response_hook | def response_hook(status, response_headers, exc_info=None):"""Scan the environment for keys specified in the scanlist,pack up their values, signs the content and issues a cookie."""scanlist = environ.get(self.environ_name)assert scanlist and isinstance(scanlist, self.environ_class)content = []for k in scanlist:v = envi... | 7 | 22 | 3 | 165 | 0 | 288 | 313 | 288 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.response_hook) defined within the public class called public.The function start at line 288 and ends at 313. It contains 22 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [288.0] and does not return any value.. |
pasteorg_paste | AuthCookieHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):if self.environ_name in environ:raise AssertionError("AuthCookie already installed!")scanlist = self.environ_class(self, self.scanlist)jar = get_cookies(environ)if self.cookie_name in jar:content = self.signer.auth(jar[self.cookie_name].value)if content:for pair in content.sp... | 9 | 26 | 3 | 165 | 0 | 263 | 314 | 263 | self,environ,start_response | [] | Returns | {"Assign": 15, "AugAssign": 1, "Expr": 5, "For": 2, "If": 11, "Return": 2} | 24 | 52 | 24 | ["AssertionError", "self.environ_class", "get_cookies", "self.signer.auth", "content.split", "pair.split", "decode", "scanlist.append", "decode", "warnings.warn", "environ.get", "isinstance", "environ.get", "type", "ValueError", "content.append", "encode", "encode", "join", "self.signer.sign", "content.decode", "respon... | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called AuthCookieHandler.The function start at line 263 and ends at 314. It contains 26 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [263.0], and this function return a value. It declares 24.0 functions, It has 24.0 ... |
pasteorg_paste | public | public | 0 | 0 | make_auth_cookie | def make_auth_cookie(app, global_conf,# Should this get picked up from global_conf somehow?:cookie_name='PASTE_AUTH_COOKIE',scanlist=('REMOTE_USER', 'REMOTE_SESSION'),# signer cannot be setsecret=None,timeout=30,maxlen=4096):"""This middleware uses cookies to stash-away a previouslyauthenticated user (and perhaps other... | 6 | 24 | 4 | 126 | 4 | 319 | 397 | 319 | app,global_conf,cookie_name,scanlist,secret,timeout,maxlen | ['timeout', 'maxlen', 'secret', 'scanlist'] | Returns | {"Assign": 4, "Expr": 1, "If": 2, "Return": 1, "Try": 2} | 8 | 79 | 8 | ["isinstance", "scanlist.split", "global_conf.get", "int", "ValueError", "int", "ValueError", "AuthCookieHandler"] | 0 | [] | The function (make_auth_cookie) defined within the public class called public.The function start at line 319 and ends at 397. It contains 24 lines of code and it has a cyclomatic complexity of 6. It takes 4 parameters, represented as [319.0], and this function return a value. It declares 8.0 functions, and It has 8.0 ... |
pasteorg_paste | public | public | 0 | 0 | _split_auth_string | def _split_auth_string(auth_string):""" split a digest auth string into individual key=value strings """prev = Nonefor item in auth_string.split(","):try:if prev.count('"') == 1:prev = "%s,%s" % (prev, item)continueexcept AttributeError:if prev is None:prev = itemcontinueelse:returnyield prev.strip()prev = itemyield pr... | 5 | 16 | 1 | 71 | 1 | 48 | 65 | 48 | auth_string | ['prev'] | None | {"Assign": 4, "Expr": 3, "For": 1, "If": 2, "Return": 1, "Try": 1} | 4 | 18 | 4 | ["auth_string.split", "prev.count", "prev.strip", "prev.strip"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.digest_py._auth_to_kv_pairs"] | The function (_split_auth_string) defined within the public class called public.The function start at line 48 and ends at 65. It contains 16 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions cal... |
pasteorg_paste | public | public | 0 | 0 | _auth_to_kv_pairs | def _auth_to_kv_pairs(auth_string):""" split a digest auth string into key, value pairs """for item in _split_auth_string(auth_string):(k, v) = item.split("=", 1)if v.startswith('"') and len(v) > 1 and v.endswith('"'):v = v[1:-1]yield (k, v) | 5 | 6 | 1 | 65 | 1 | 67 | 73 | 67 | auth_string | ['v'] | None | {"Assign": 2, "Expr": 2, "For": 1, "If": 1} | 5 | 7 | 5 | ["_split_auth_string", "item.split", "v.startswith", "len", "v.endswith"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.digest_py.AuthDigestAuthenticator.authenticate"] | The function (_auth_to_kv_pairs) defined within the public class called public.The function start at line 67 and ends at 73. It contains 6 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 5.0 functions, It has 5.0 functions calle... |
pasteorg_paste | public | public | 0 | 0 | digest_password | def digest_password(realm, username, password):""" construct the appropriate hashcode needed for HTTP digest """content = "%s:%s:%s" % (username, realm, password)content = content.encode('utf8')return md5(content).hexdigest() | 1 | 4 | 3 | 38 | 1 | 75 | 79 | 75 | realm,username,password | ['content'] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 3 | 5 | 3 | ["content.encode", "hexdigest", "md5"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_auth.test_auth_digest_py.backwords"] | The function (digest_password) defined within the public class called public.The function start at line 75 and ends at 79. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [75.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions ... |
pasteorg_paste | AuthDigestAuthenticator | public | 0 | 0 | __init__ | def __init__(self, realm, authfunc):self.nonce= {} # list to prevent replay attacksself.authfunc = authfuncself.realm= realm | 1 | 4 | 3 | 25 | 0 | 83 | 86 | 83 | self,realm,authfunc | [] | None | {"Assign": 3} | 0 | 4 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthDigestAuthenticator.The function start at line 83 and ends at 86. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [83.0] and does not return any value. It has 6814.0 functions calling this funct... |
pasteorg_paste | AuthDigestAuthenticator | public | 0 | 0 | build_authentication | def build_authentication(self, stale = ''):""" builds the authentication error """content = "%s:%s" % (time.time(), random.random())content = content.encode('utf-8')nonce= md5(content).hexdigest()content = "%s:%s" % (time.time(), random.random())content = content.encode('utf-8')opaque = md5(content).hexdigest()self.non... | 3 | 15 | 2 | 164 | 0 | 88 | 105 | 88 | self,stale | [] | Returns | {"Assign": 11, "Expr": 1, "If": 1, "Return": 1} | 13 | 18 | 13 | ["time.time", "random.random", "content.encode", "hexdigest", "md5", "time.time", "random.random", "content.encode", "hexdigest", "md5", "join", "parts.items", "HTTPUnauthorized"] | 0 | [] | The function (build_authentication) defined within the public class called AuthDigestAuthenticator.The function start at line 88 and ends at 105. It contains 15 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [88.0], and this function return a value. It declares 13.0 functio... |
pasteorg_paste | AuthDigestAuthenticator | public | 0 | 0 | compute | def compute(self, ha1, username, response, method,path, nonce, nc, cnonce, qop):""" computes the authentication, raises error if unsuccessful """if not ha1:return self.build_authentication()content = '%s:%s' % (method, path)content = content.encode('utf8')ha2 = md5(content).hexdigest()if qop:chk = "%s:%s:%s:%s:%s:%s" %... | 8 | 23 | 10 | 189 | 0 | 107 | 130 | 107 | self,ha1,username,response,method,path,nonce,nc,cnonce,qop | [] | Returns | {"Assign": 8, "Expr": 1, "If": 6, "Return": 4} | 10 | 24 | 10 | ["self.build_authentication", "content.encode", "hexdigest", "md5", "chk.encode", "hexdigest", "md5", "self.build_authentication", "self.nonce.get", "self.build_authentication"] | 6 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567810_openfisca_openfisca_web_api.openfisca_web_api.controllers.formula_py.api1_formula", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567810_openfisca_openfisca_web_api.openfisca_web_api.controllers.formula_py.... | The function (compute) defined within the public class called AuthDigestAuthenticator.The function start at line 107 and ends at 130. It contains 23 lines of code and it has a cyclomatic complexity of 8. It takes 10 parameters, represented as [107.0], and this function return a value. It declares 10.0 functions, It has... |
pasteorg_paste | AuthDigestAuthenticator | public | 0 | 0 | authenticate | def authenticate(self, environ):""" This function takes a WSGI environment and authenticatesthe request returning authenticated user or error."""method = REQUEST_METHOD(environ)fullpath = url_quote(SCRIPT_NAME(environ)) + url_quote(PATH_INFO(environ))authorization = AUTHORIZATION(environ)if not authorization:return sel... | 6 | 29 | 2 | 222 | 0 | 132 | 163 | 132 | self,environ | [] | Returns | {"Assign": 14, "Expr": 1, "If": 3, "Return": 4, "Try": 1} | 19 | 32 | 19 | ["REQUEST_METHOD", "url_quote", "SCRIPT_NAME", "url_quote", "PATH_INFO", "AUTHORIZATION", "self.build_authentication", "authorization.split", "authmeth.lower", "self.build_authentication", "dict", "_auth_to_kv_pairs", "authpath.split", "amap.get", "amap.get", "amap.get", "self.build_authentication", "self.authfunc", "s... | 88 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectMultiSession.authenticate", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676779_dj_wasabi_ansible_zabbix_agent.molecule.with_server.tests.test_agent_py.test_psk_ho... | The function (authenticate) defined within the public class called AuthDigestAuthenticator.The function start at line 132 and ends at 163. It contains 29 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [132.0], and this function return a value. It declares 19.0 functions, It... |
pasteorg_paste | AuthDigestAuthenticator | public | 0 | 0 | __init__ | def __init__(self, application, realm, authfunc):self.authenticate = AuthDigestAuthenticator(realm, authfunc)self.application = application | 1 | 3 | 4 | 26 | 0 | 215 | 217 | 215 | self,realm,authfunc | [] | None | {"Assign": 3} | 0 | 4 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthDigestAuthenticator.The function start at line 215 and ends at 217. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [215.0] and does not return any value. It has 6814.0 functions calling this fu... |
pasteorg_paste | AuthDigestHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):username = REMOTE_USER(environ)if not username:result = self.authenticate(environ)if isinstance(result, str):AUTH_TYPE.update(environ,'digest')REMOTE_USER.update(environ, result)else:return result.wsgi_application(environ, start_response)return self.application(environ, start... | 3 | 10 | 3 | 71 | 0 | 219 | 228 | 219 | self,environ,start_response | [] | Returns | {"Assign": 2, "Expr": 2, "If": 2, "Return": 2} | 7 | 10 | 7 | ["REMOTE_USER", "self.authenticate", "isinstance", "AUTH_TYPE.update", "REMOTE_USER.update", "result.wsgi_application", "self.application"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called AuthDigestHandler.The function start at line 219 and ends at 228. It contains 10 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [219.0], and this function return a value. It declares 7.0 functions, It has 7.0 fu... |
pasteorg_paste | public | public | 0 | 0 | make_digest | def make_digest(app, global_conf, realm, authfunc, **kw):"""Grant access via digest authenticationConfig looks like this::[filter:grant]use = egg:Paste#auth_digestrealm=myrealmauthfunc=somepackage.somemodule:somefunction"""from paste.util.import_string import eval_importimport typesauthfunc = eval_import(authfunc)asser... | 1 | 6 | 5 | 51 | 1 | 234 | 250 | 234 | app,global_conf,realm,authfunc,**kw | ['authfunc'] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 3 | 17 | 3 | ["eval_import", "isinstance", "AuthDigestHandler"] | 0 | [] | The function (make_digest) defined within the public class called public.The function start at line 234 and ends at 250. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [234.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functi... |
pasteorg_paste | AuthFormHandler | public | 0 | 0 | __init__ | def __init__(self, application, authfunc, template=None):self.application = applicationself.authfunc = authfuncself.template = template or TEMPLATE | 2 | 4 | 4 | 30 | 0 | 91 | 94 | 91 | self,application,authfunc,template | [] | None | {"Assign": 3} | 0 | 4 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthFormHandler.The function start at line 91 and ends at 94. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [91.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | AuthFormHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):username = environ.get('REMOTE_USER','')if username:return self.application(environ, start_response)if 'POST' == environ['REQUEST_METHOD']:formvars = parse_formvars(environ, include_get_vars=False)username = formvars.get('username')password = formvars.get('password')if userna... | 6 | 21 | 3 | 164 | 0 | 96 | 118 | 96 | self,environ,start_response | [] | Returns | {"Assign": 10, "Expr": 1, "If": 4, "Return": 3} | 11 | 23 | 11 | ["environ.get", "self.application", "parse_formvars", "formvars.get", "formvars.get", "self.authfunc", "self.application", "construct_url", "start_response", "str", "len"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called AuthFormHandler.The function start at line 96 and ends at 118. It contains 21 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [96.0], and this function return a value. It declares 11.0 functions, It has 11.0 func... |
pasteorg_paste | public | public | 0 | 0 | make_form | def make_form(app, global_conf, realm, authfunc, **kw):"""Grant access via form authenticationConfig looks like this::[filter:grant]use = egg:Paste#auth_formrealm=myrealmauthfunc=somepackage.somemodule:somefunction"""from paste.util.import_string import eval_importimport typesauthfunc = eval_import(authfunc)assert isin... | 2 | 10 | 5 | 80 | 2 | 124 | 145 | 124 | app,global_conf,realm,authfunc,**kw | ['authfunc', 'template'] | Returns | {"Assign": 3, "Expr": 1, "If": 1, "Return": 1} | 6 | 22 | 6 | ["eval_import", "isinstance", "kw.get", "eval_import", "isinstance", "AuthFormHandler"] | 0 | [] | The function (make_form) defined within the public class called public.The function start at line 124 and ends at 145. It contains 10 lines of code and it has a cyclomatic complexity of 2. It takes 5 parameters, represented as [124.0], and this function return a value. It declares 6.0 functions, and It has 6.0 functio... |
pasteorg_paste | GrantIPMiddleware | public | 0 | 0 | __init__ | def __init__(self, app, ip_map, clobber_username=True):self.app = appself.ip_map = []for key, value in ip_map.items():self.ip_map.append((ip4.IP4Range(key),self._convert_user_role(value[0], value[1])))self.clobber_username = clobber_username | 2 | 7 | 4 | 70 | 0 | 28 | 34 | 28 | self,app,ip_map,clobber_username | [] | None | {"Assign": 3, "Expr": 1, "For": 1} | 4 | 7 | 4 | ["ip_map.items", "self.ip_map.append", "ip4.IP4Range", "self._convert_user_role"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called GrantIPMiddleware.The function start at line 28 and ends at 34. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [28.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions ... |
pasteorg_paste | GrantIPMiddleware | public | 0 | 0 | _convert_user_role | def _convert_user_role(self, username, roles):if roles and isinstance(roles, str):roles = roles.split(',')return (username, roles) | 3 | 4 | 3 | 33 | 0 | 36 | 39 | 36 | self,username,roles | [] | Returns | {"Assign": 1, "If": 1, "Return": 1} | 2 | 4 | 2 | ["isinstance", "roles.split"] | 0 | [] | The function (_convert_user_role) defined within the public class called GrantIPMiddleware.The function start at line 36 and ends at 39. It contains 4 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [36.0], and this function return a value. It declares 2.0 functions, and It... |
pasteorg_paste | GrantIPMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):addr = ip4.ip2int(environ['REMOTE_ADDR'], False)remove_user = Falseadd_roles = []for range, (username, roles) in self.ip_map:if addr in range:if roles:add_roles.extend(roles)if username == '__remove__':remove_user = Trueelif username:if (not environ.get('REMOTE_USER')or self.... | 11 | 19 | 3 | 122 | 0 | 41 | 59 | 41 | self,environ,start_response | [] | Returns | {"Assign": 5, "Expr": 2, "For": 1, "If": 7, "Return": 1} | 5 | 19 | 5 | ["ip4.ip2int", "add_roles.extend", "environ.get", "self._set_roles", "self.app"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called GrantIPMiddleware.The function start at line 41 and ends at 59. It contains 19 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [41.0], and this function return a value. It declares 5.0 functions, It has 5.0 func... |
pasteorg_paste | GrantIPMiddleware | public | 0 | 0 | _set_roles | def _set_roles(self, environ, roles):cur_roles = environ.get('REMOTE_USER_TOKENS', '').split(',')# Get rid of empty roles:cur_roles = list(filter(None, cur_roles))remove_roles = []for role in roles:if role.startswith('-'):remove_roles.append(role[1:])else:if role not in cur_roles:cur_roles.append(role)for role in remov... | 6 | 14 | 3 | 103 | 0 | 61 | 75 | 61 | self,environ,roles | [] | None | {"Assign": 4, "Expr": 3, "For": 2, "If": 3} | 9 | 15 | 9 | ["split", "environ.get", "list", "filter", "role.startswith", "remove_roles.append", "cur_roles.append", "cur_roles.remove", "join"] | 0 | [] | The function (_set_roles) defined within the public class called GrantIPMiddleware.The function start at line 61 and ends at 75. It contains 14 lines of code and it has a cyclomatic complexity of 6. It takes 3 parameters, represented as [61.0] and does not return any value. It declares 9.0 functions, and It has 9.0 fu... |
pasteorg_paste | public | public | 0 | 0 | make_grantip | def make_grantip(app, global_conf, clobber_username=False, **kw):"""Grant roles or usernames based on IP addresses.Config looks like this::[filter:grant]use = egg:Paste#grantipclobber_username = true# Give localhost system role (no username):127.0.0.1 = -:system# Give everyone in 192.168.0.* editor role:192.168.0.0/24 ... | 5 | 16 | 4 | 100 | 4 | 78 | 111 | 78 | app,global_conf,clobber_username,**kw | ['clobber_username', 'role', 'ip_map', 'username'] | Returns | {"Assign": 8, "Expr": 1, "For": 1, "If": 3, "Return": 1} | 4 | 34 | 4 | ["asbool", "kw.items", "value.split", "GrantIPMiddleware"] | 0 | [] | The function (make_grantip) defined within the public class called public.The function start at line 78 and ends at 111. It contains 16 lines of code and it has a cyclomatic complexity of 5. It takes 4 parameters, represented as [78.0], and this function return a value. It declares 4.0 functions, and It has 4.0 functi... |
pasteorg_paste | MultiHandler | public | 0 | 0 | __init__ | def __init__(self, application):self.application = applicationself.default = applicationself.binding = {}self.predicate = [] | 1 | 5 | 2 | 29 | 0 | 49 | 53 | 49 | self,application | [] | None | {"Assign": 4} | 0 | 5 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called MultiHandler.The function start at line 49 and ends at 53. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [49.0] and does not return any value. It has 6814.0 functions calling this function which a... |
pasteorg_paste | MultiHandler | public | 0 | 0 | add_method | def add_method(self, name, factory, *args, **kwargs):self.binding[name] = factory(self.application, *args, **kwargs) | 1 | 2 | 5 | 34 | 0 | 54 | 55 | 54 | self,name,factory,*args,**kwargs | [] | None | {"Assign": 1} | 1 | 2 | 1 | ["factory"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.68272342_aiplan4eu_unified_planning.up_test_cases.builtin.hierarchical.__init___py.get_test_cases", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69376580_substra_substra_tests.tests.test_network_py.test_update_name... | The function (add_method) defined within the public class called MultiHandler.The function start at line 54 and ends at 55. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 5 parameters, represented as [54.0] and does not return any value. It declare 1.0 function, It has 1.0 function called... |
pasteorg_paste | MultiHandler | public | 0 | 0 | add_predicate | def add_predicate(self, name, checker):self.predicate.append((checker, self.binding[name])) | 1 | 2 | 3 | 26 | 0 | 56 | 57 | 56 | self,name,checker | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.predicate.append"] | 0 | [] | The function (add_predicate) defined within the public class called MultiHandler.The function start at line 56 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [56.0] and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
pasteorg_paste | MultiHandler | public | 0 | 0 | set_default | def set_default(self, name):""" set default authentication method """self.default = self.binding[name] | 1 | 2 | 2 | 18 | 0 | 58 | 60 | 58 | self,name | [] | None | {"Assign": 1, "Expr": 1} | 0 | 3 | 0 | [] | 0 | [] | The function (set_default) defined within the public class called MultiHandler.The function start at line 58 and ends at 60. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [58.0] and does not return any value.. |
pasteorg_paste | MultiHandler | public | 0 | 0 | set_query_argument | def set_query_argument(self, name, key = '*authmeth', value = None):""" choose authentication method based on a query argument """lookfor = "%s=%s" % (key, value or name)self.add_predicate(name,lambda environ: lookfor in environ.get('QUERY_STRING','')) | 2 | 4 | 4 | 47 | 0 | 61 | 65 | 61 | self,name,key,value | [] | None | {"Assign": 1, "Expr": 2} | 2 | 5 | 2 | ["self.add_predicate", "environ.get"] | 0 | [] | The function (set_query_argument) defined within the public class called MultiHandler.The function start at line 61 and ends at 65. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [61.0] and does not return any value. It declares 2.0 functions, and It has 2.0 ... |
pasteorg_paste | MultiHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):for (checker, binding) in self.predicate:if checker(environ):return binding(environ, start_response)return self.default(environ, start_response) | 3 | 5 | 3 | 42 | 0 | 66 | 70 | 66 | self,environ,start_response | [] | Returns | {"For": 1, "If": 1, "Return": 2} | 3 | 5 | 3 | ["checker", "binding", "self.default"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called MultiHandler.The function start at line 66 and ends at 70. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [66.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | quoteattr | def quoteattr(s):qs = html.escape(s)return '"%s"' % (qs,) | 1 | 3 | 1 | 20 | 1 | 65 | 67 | 65 | s | ['qs'] | Returns | {"Assign": 1, "Return": 1} | 1 | 3 | 1 | ["html.escape"] | 8 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3708743_redhatqe_widgetastic_core.src.widgetastic.xpath_py.quote", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966383_jfilak_sapcli.sap.adt.marshalling_py.Marshal._element_to_xml", "_.content.gdrive.MyDrive.Phd_T... | The function (quoteattr) defined within the public class called public.The function start at line 65 and ends at 67. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called insid... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | __init__ | def __init__(self, app, data_store_path, auth_prefix='/oid', login_redirect=None, catch_401=False, url_to_username=None):"""Initialize the OpenID middleware``app``Your WSGI app to call``data_store_path``Directory to store crypto data in for use with OpenID servers.``auth_prefix``Location for authentication process/veri... | 1 | 11 | 7 | 74 | 0 | 85 | 119 | 85 | self,app,data_store_path,auth_prefix,login_redirect,catch_401,url_to_username | [] | None | {"Assign": 8, "Expr": 1} | 2 | 35 | 2 | ["filestore.FileOpenIDStore", "consumer.OpenIDConsumer"] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called AuthOpenIDHandler.The function start at line 85 and ends at 119. It contains 11 lines of code and it has a cyclomatic complexity of 1. It takes 7 parameters, represented as [85.0] and does not return any value. It declares 2.0 functions, It has 2.0 function... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):if environ['PATH_INFO'].startswith(self.auth_prefix):# Let's load everything into a request dict to pass around easierrequest = dict(environ=environ, start=start_response, body=[])request['base_url'] = paste.request.construct_url(environ, with_path_info=False,with_query_strin... | 7 | 21 | 3 | 186 | 0 | 121 | 144 | 121 | self,environ,start_response | [] | Returns | {"Assign": 6, "If": 5, "Return": 6} | 13 | 24 | 13 | ["startswith", "dict", "paste.request.construct_url", "re.sub", "urlparse.urlparse", "dict", "paste.request.parse_querystring", "self.render", "self.do_verify", "self.do_process", "self.not_found", "self.catch_401_app_call", "self.app"] | 43 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.renderers_py.GeoJSON.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.schemas.validators_py.PermissionValidator.__call__", "_.content... | The function (__call__) defined within the public class called AuthOpenIDHandler.The function start at line 121 and ends at 144. It contains 21 lines of code and it has a cyclomatic complexity of 7. It takes 3 parameters, represented as [121.0], and this function return a value. It declares 13.0 functions, It has 13.0 ... |
pasteorg_paste | public | public | 0 | 0 | catch_401_app_call.catch_401_app_call.replacement_start_response.dummy_writer | def dummy_writer(v):pass | 1 | 2 | 1 | 6 | 0 | 156 | 157 | 156 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (catch_401_app_call.catch_401_app_call.replacement_start_response.dummy_writer) defined within the public class called public.The function start at line 156 and ends at 157. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return an... |
pasteorg_paste | public | public | 0 | 0 | catch_401_app_call.replacement_start_response | def replacement_start_response(status, headers, exc_info=None):if int(status.split(None, 1)) == 401:# @@: Do I need to append something to go back to where we# came from?was_401.append(1)def dummy_writer(v):passreturn dummy_writerelse:return start_response(status, headers, exc_info) | 2 | 7 | 3 | 47 | 0 | 151 | 160 | 151 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (catch_401_app_call.replacement_start_response) defined within the public class called public.The function start at line 151 and ends at 160. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [151.0] and does not return any value.. |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | catch_401_app_call | def catch_401_app_call(self, environ, start_response):"""Call the application, and redirect if the app returns a 401 response"""was_401 = []def replacement_start_response(status, headers, exc_info=None):if int(status.split(None, 1)) == 401:# @@: Do I need to append something to go back to where we# came from?was_401.ap... | 4 | 16 | 3 | 89 | 0 | 146 | 173 | 146 | self,environ,start_response | [] | Returns | {"Assign": 4, "Expr": 4, "If": 3, "Return": 4, "Try": 1} | 11 | 28 | 11 | ["int", "status.split", "was_401.append", "start_response", "self.app", "list", "hasattr", "app_iter.close", "paste.request.construct_url", "httpexceptions.HTTPTemporaryRedirect", "exc.wsgi_application"] | 0 | [] | The function (catch_401_app_call) defined within the public class called AuthOpenIDHandler.The function start at line 146 and ends at 173. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [146.0], and this function return a value. It declares 11.0 functions, an... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | do_verify | def do_verify(self, request):"""Process the form submission, initating OpenID verification."""# First, make sure that the user entered somethingopenid_url = request['query'].get('openid_url')if not openid_url:return self.render(request, 'Enter an identity URL to verify.',css_class='error', form_contents=openid_url)oidc... | 5 | 21 | 2 | 168 | 0 | 175 | 224 | 175 | self,request | [] | Returns | {"Assign": 8, "Expr": 1, "If": 4, "Return": 3} | 8 | 50 | 8 | ["get", "self.render", "oidconsumer.beginAuth", "html.escape", "self.render", "self.build_url", "oidconsumer.constructRedirect", "self.redirect"] | 2 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87033950_inter_actief_amelie.amelie.claudia.tasks_py.verify_instance", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87033950_inter_actief_amelie.amelie.claudia.tasks_py.verify_mapping"] | The function (do_verify) defined within the public class called AuthOpenIDHandler.The function start at line 175 and ends at 224. It contains 21 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [175.0], and this function return a value. It declares 8.0 functions, It has 8.0 f... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | do_process | def do_process(self, request):"""Handle the redirect from the OpenID server."""oidconsumer = self.oidconsumer# retrieve the token from the environment (in this case, the URL)token = request['query'].get('token', '')# Ask the library to check the response that the server sent# us.Status is a code indicating the response... | 8 | 34 | 2 | 218 | 0 | 226 | 287 | 226 | self,request | [] | Returns | {"Assign": 18, "Expr": 2, "If": 6, "Return": 2} | 7 | 62 | 7 | ["get", "oidconsumer.completeAuth", "html.escape", "self.url_to_username", "html.escape", "self.app", "self.render"] | 0 | [] | The function (do_process) defined within the public class called AuthOpenIDHandler.The function start at line 226 and ends at 287. It contains 34 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [226.0], and this function return a value. It declares 7.0 functions, and It has... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | build_url | def build_url(self, request, action, **query):"""Build a URL relative to the server base_url, with the givenquery parameters added."""base = urlparse.urljoin(request['base_url'], self.auth_prefix + '/' + action)return appendArgs(base, query) | 1 | 3 | 4 | 39 | 0 | 289 | 293 | 289 | self,request,action,**query | [] | Returns | {"Assign": 1, "Expr": 1, "Return": 1} | 2 | 5 | 2 | ["urlparse.urljoin", "appendArgs"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3952404_jbittel_django_mama_cas.mama_cas.tests.test_views_py.SamlValidationViewTests.test_saml_validation_view_http_service", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3952404_jbittel_django_mama_cas.mama_cas.te... | The function (build_url) defined within the public class called AuthOpenIDHandler.The function start at line 289 and ends at 293. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [289.0], and this function return a value. It declares 2.0 functions, It has 2.0 fu... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | redirect | def redirect(self, request, redirect_url):"""Send a redirect response to the given URL to the browser."""response_headers = [('Content-type', 'text/plain'),('Location', redirect_url)]request['start']('302 REDIRECT', response_headers)return ["Redirecting to %s" % redirect_url] | 1 | 5 | 3 | 40 | 0 | 295 | 300 | 295 | self,request,redirect_url | [] | Returns | {"Assign": 1, "Expr": 2, "Return": 1} | 0 | 6 | 0 | [] | 231 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470350_lincolnloop_django_debug_logging.debug_logging.views_py.delete_runs", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3519472_california_civic_data_coalition_django_calaccess_campaign_browser.calaccess_campaig... | The function (redirect) defined within the public class called AuthOpenIDHandler.The function start at line 295 and ends at 300. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [295.0], and this function return a value. It has 231.0 functions calling this funct... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | not_found | def not_found(self, request):"""Render a page with a 404 return code and a message."""fmt = 'The path <q>%s</q> was not understood by this server.'msg = fmt % (request['parsed_uri'],)openid_url = request['query'].get('openid_url')return self.render(request, msg, 'error', openid_url, status='404 Not Found') | 1 | 5 | 2 | 50 | 0 | 302 | 307 | 302 | self,request | [] | Returns | {"Assign": 3, "Expr": 1, "Return": 1} | 2 | 6 | 2 | ["get", "self.render"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.fsdiff_py.Snapshot.compare_expected"] | The function (not_found) defined within the public class called AuthOpenIDHandler.The function start at line 302 and ends at 307. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [302.0], and this function return a value. It declares 2.0 functions, It has 2.0 fu... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | render | def render(self, request, message=None, css_class='alert', form_contents=None, status='200 OK', title="Python OpenID Consumer"):"""Render a page."""response_headers = [('Content-type', 'text/html')]request['start'](str(status), response_headers)self.page_header(request, title)if message:request['body'].append("<div cla... | 2 | 11 | 7 | 105 | 0 | 309 | 321 | 309 | self,request,message,css_class,form_contents,status,title | [] | Returns | {"Assign": 1, "Expr": 7, "If": 1, "Return": 1} | 6 | 13 | 6 | ["str", "self.page_header", "append", "append", "append", "self.page_footer"] | 323 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3519472_california_civic_data_coalition_django_calaccess_campaign_browser.calaccess_campaign_browser.views.search_py.search_contribs_by_name", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3527343_frigg_frigg_hq.fri... | The function (render) defined within the public class called AuthOpenIDHandler.The function start at line 309 and ends at 321. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 7 parameters, represented as [309.0], and this function return a value. It declares 6.0 functions, It has 6.0 func... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | page_header | def page_header(self, request, title):"""Render the page header"""request['body'].append('''\<html><head><title>%s</title></head><style type="text/css">* {font-family: verdana,sans-serif;}body {width: 50em;margin: 1em;}div {padding: .5em;}table {margin: none;padding: none;}.alert {border: 1px solid #e7dc2b;background: ... | 1 | 42 | 3 | 25 | 0 | 323 | 365 | 323 | self,request,title | [] | None | {"Expr": 2} | 1 | 43 | 1 | ["append"] | 0 | [] | The function (page_header) defined within the public class called AuthOpenIDHandler.The function start at line 323 and ends at 365. It contains 42 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [323.0] and does not return any value. It declare 1.0 function, and It has 1.0 ... |
pasteorg_paste | AuthOpenIDHandler | public | 0 | 0 | page_footer | def page_footer(self, request, form_contents):"""Render the page footer"""if not form_contents:form_contents = ''request['body'].append('''\<div id="verify-form"><form method="get" action=%s>Identity URL:<input type="text" name="openid_url" value=%s /><input type="submit" value="Verify" /></form></div></body></htm... | 2 | 14 | 3 | 45 | 0 | 367 | 382 | 367 | self,request,form_contents | [] | None | {"Assign": 1, "Expr": 2, "If": 1} | 4 | 16 | 4 | ["append", "quoteattr", "self.build_url", "quoteattr"] | 0 | [] | The function (page_footer) defined within the public class called AuthOpenIDHandler.The function start at line 367 and ends at 382. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [367.0] and does not return any value. It declares 4.0 functions, and It has 4.... |
pasteorg_paste | public | public | 0 | 0 | make_open_id_middleware | def make_open_id_middleware(app,global_conf,# Should this default to something, or inherit something from global_conf?:data_store_path,auth_prefix='/oid',login_redirect=None,catch_401=False,url_to_username=None,apply_auth_tkt=False,auth_tkt_logout_path=None):from paste.deploy.converters import asboolfrom paste.util imp... | 5 | 25 | 9 | 130 | 4 | 387 | 412 | 387 | app,global_conf,data_store_path,auth_prefix,login_redirect,catch_401,url_to_username,apply_auth_tkt,auth_tkt_logout_path | ['url_to_username', 'catch_401', 'new_app', 'apply_auth_tkt'] | Returns | {"Assign": 5, "If": 2, "Return": 1} | 6 | 26 | 6 | ["asbool", "isinstance", "import_string.eval_import", "asbool", "AuthOpenIDHandler", "auth_tkt.make_auth_tkt_middleware"] | 0 | [] | The function (make_open_id_middleware) defined within the public class called public.The function start at line 387 and ends at 412. It contains 25 lines of code and it has a cyclomatic complexity of 5. It takes 9 parameters, represented as [387.0], and this function return a value. It declares 6.0 functions, and It h... |
pasteorg_paste | MoreCowbell | public | 0 | 0 | __init__ | def __init__(self, app):self.app = app | 1 | 2 | 2 | 12 | 0 | 10 | 11 | 10 | self,app | [] | None | {"Assign": 1} | 0 | 2 | 0 | [] | 6,814 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content.... | The function (__init__) defined within the public class called MoreCowbell.The function start at line 10 and ends at 11. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [10.0] and does not return any value. It has 6814.0 functions calling this function which ar... |
pasteorg_paste | public | public | 0 | 0 | __call__.repl_start_response | def repl_start_response(status, headers, exc_info=None):ct = header_value(headers, 'content-type')if ct and ct.startswith('text/html'):type.append(ct)remove_header(headers, 'content-length')start_response(status, headers, exc_info)return body.appendreturn start_response(status, headers, exc_info) | 3 | 8 | 3 | 62 | 0 | 21 | 28 | 21 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.repl_start_response) defined within the public class called public.The function start at line 21 and ends at 28. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [21.0] and does not return any value.. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.