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 | ThreadPool | public | 0 | 0 | kill_hung_threads | def kill_hung_threads(self):"""Tries to kill any hung threads"""if not self.kill_thread_limit:# No killing should occurreturnnow = time.time()max_time = 0total_time = 0idle_workers = 0starting_workers = 0working_workers = 0killed_workers = 0for worker in self.workers:if not hasattr(worker, 'thread_id'):# Not setup yets... | 8 | 56 | 1 | 269 | 0 | 768 | 829 | 768 | self | [] | None | {"Assign": 15, "AugAssign": 5, "Expr": 7, "For": 1, "If": 5, "Return": 1, "Try": 1} | 15 | 62 | 15 | ["time.time", "hasattr", "self.worker_tracker.get", "max", "self.logger.warning", "pprint.pformat", "io.StringIO", "traceback.print_exc", "out.getvalue", "self.notify_problem", "dict", "self.kill_worker", "float", "self.logger.info", "self.check_max_zombies"] | 0 | [] | The function (kill_hung_threads) defined within the public class called ThreadPool.The function start at line 768 and ends at 829. It contains 56 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 15.0 functions, and It has 15.0 f... |
pasteorg_paste | ThreadPool | public | 0 | 0 | check_max_zombies | def check_max_zombies(self):"""Check if we've reached max_zombie_threads_before_die; if sothen kill the entire process."""if not self.max_zombie_threads_before_die:returnfound = []now = time.time()for thread_id, (time_killed, worker) in self.dying_threads.items():if not self.thread_exists(thread_id):# Cull dying thread... | 8 | 32 | 1 | 183 | 0 | 831 | 867 | 831 | self | [] | None | {"Assign": 2, "Expr": 7, "For": 1, "If": 5, "Return": 1, "Try": 1} | 17 | 37 | 17 | ["time.time", "self.dying_threads.items", "self.thread_exists", "found.append", "self.logger.info", "len", "self.logger.fatal", "len", "self.notify_problem", "dict", "len", "join", "map", "self.shutdown", "print", "threading.current_thread", "ServerExit"] | 0 | [] | The function (check_max_zombies) defined within the public class called ThreadPool.The function start at line 831 and ends at 867. It contains 32 lines of code and it has a cyclomatic complexity of 8. The function does not take any parameters and does not return any value. It declares 17.0 functions, and It has 17.0 f... |
pasteorg_paste | ThreadPool | public | 0 | 0 | worker_thread_callback | def worker_thread_callback(self, message=None):"""Worker thread should call this method to get and process queuedcallables."""thread_obj = threading.current_thread()thread_id = thread_obj.thread_id = _thread.get_ident()self.workers.append(thread_obj)self.idle_workers.append(thread_id)requests_processed = 0add_replaceme... | 16 | 59 | 2 | 287 | 0 | 869 | 937 | 869 | self,message | [] | None | {"Assign": 7, "AugAssign": 1, "Expr": 14, "If": 4, "Try": 9, "While": 1} | 17 | 69 | 17 | ["threading.current_thread", "_thread.get_ident", "self.workers.append", "self.idle_workers.append", "self.logger.debug", "self.logger.debug", "self.queue.get", "self.logger.debug", "self.idle_workers.remove", "time.time", "runnable", "print", "traceback.print_exc", "self.idle_workers.append", "self.idle_workers.remove... | 0 | [] | The function (worker_thread_callback) defined within the public class called ThreadPool.The function start at line 869 and ends at 937. It contains 59 lines of code and it has a cyclomatic complexity of 16. It takes 2 parameters, represented as [869.0] and does not return any value. It declares 17.0 functions, and It ... |
pasteorg_paste | ThreadPool | public | 0 | 0 | shutdown | def shutdown(self, force_quit_timeout=0):"""Shutdown the queue (after finishing any pending requests)."""self.logger.info('Shutting down threadpool')# Add a shutdown request for every workerfor i in range(len(self.workers)):self.queue.put(ThreadPool.SHUTDOWN)# Wait for each thread to terminatehung_workers = []for worke... | 19 | 47 | 2 | 299 | 0 | 939 | 991 | 939 | self,force_quit_timeout | [] | None | {"Assign": 9, "Expr": 17, "For": 6, "If": 10} | 29 | 53 | 29 | ["self.logger.info", "range", "len", "self.queue.put", "worker.join", "worker.is_alive", "hung_workers.append", "self.thread_exists", "zombies.append", "self.logger.info", "len", "len", "self.kill_worker", "self.logger.info", "bool", "worker.is_alive", "worker.join", "worker.is_alive", "print", "list", "getattr", "geta... | 38 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660028_openprocurement_openprocurement_auction.openprocurement.auction.helpers.chronograph_py.AuctionScheduler.shutdown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3660682_snare_voltron.voltron.core_py.VoltronW... | The function (shutdown) defined within the public class called ThreadPool.The function start at line 939 and ends at 991. It contains 47 lines of code and it has a cyclomatic complexity of 19. It takes 2 parameters, represented as [939.0] and does not return any value. It declares 29.0 functions, It has 29.0 functions ... |
pasteorg_paste | ThreadPool | public | 0 | 0 | notify_problem | def notify_problem(self, msg, subject=None, spawn_thread=True):"""Called when there's a substantial problem.msg contains thebody of the notification, subject the summary.If spawn_thread is true, then the email will be send inanother thread (so this doesn't block)."""if not self.error_email:returnif spawn_thread:t = thr... | 7 | 46 | 4 | 247 | 0 | 993 | 1,045 | 993 | self,msg,subject,spawn_thread | [] | None | {"Assign": 12, "Expr": 5, "If": 3, "Return": 2, "Try": 1} | 18 | 53 | 18 | ["threading.Thread", "t.start", "splitlines", "msg.strip", "join", "os.uname", "dict", "time.strftime", "os.getpid", "os.path.abspath", "join", "smtplib.SMTP", "e.strip", "self.error_email.split", "e.strip", "server.sendmail", "server.quit", "print"] | 0 | [] | The function (notify_problem) defined within the public class called ThreadPool.The function start at line 993 and ends at 1045. It contains 46 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [993.0] and does not return any value. It declares 18.0 functions, and It has 18.0... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, nworkers, daemon=False, **threadpool_options):# Create and start the workersself.running = Trueassert nworkers > 0, "ThreadPoolMixIn servers must have at least one worker"self.thread_pool = ThreadPool(nworkers,"ThreadPoolMixIn HTTP server on %s:%d"% (self.server_name, self.server_port),daemon,**threa... | 1 | 9 | 4 | 50 | 0 | 1,051 | 1,060 | 1,051 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "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 ContinueHook.The function start at line 1051 and ends at 1060. It contains 9 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [1051.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions... |
pasteorg_paste | ThreadPoolMixIn | public | 0 | 0 | process_request | def process_request(self, request, client_address):"""Queue the request to be processed by on of the thread pool threads"""# This sets the socket to blocking mode (and no timeout) since it# may take the thread pool a little while to get back to it. (This# is the default but since we set a timeout on the parent socket s... | 1 | 4 | 3 | 33 | 0 | 1,062 | 1,073 | 1,062 | self,request,client_address | [] | None | {"Expr": 3} | 3 | 12 | 3 | ["request.setblocking", "self.thread_pool.add_task", "self.process_request_in_thread"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470350_lincolnloop_django_debug_logging.debug_logging.middleware_py.DebugLoggingMiddleware.process_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3566443_centurylinkcloud_clc_ansible_module.clc_ansible_mod... | The function (process_request) defined within the public class called ThreadPoolMixIn.The function start at line 1062 and ends at 1073. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [1062.0] and does not return any value. It declares 3.0 functions, It has 3.0... |
pasteorg_paste | ThreadPoolMixIn | public | 0 | 0 | handle_error | def handle_error(self, request, client_address):if sys.exc_info()[0] is ServerExit:# This is actually a request to stop the serverraisereturn super(ThreadPoolMixIn, self).handle_error(request, client_address) | 2 | 4 | 3 | 36 | 0 | 1,075 | 1,079 | 1,075 | self,request,client_address | [] | Returns | {"If": 1, "Return": 1} | 3 | 5 | 3 | ["sys.exc_info", "handle_error", "super"] | 16 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3682952_cisagov_trustymail.src.trustymail.trustymail_py.check_dnssec", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3682952_cisagov_trustymail.src.trustymail.trustymail_py.check_spf_record", "_.content.gdrive.MyDri... | The function (handle_error) defined within the public class called ThreadPoolMixIn.The function start at line 1075 and ends at 1079. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [1075.0], and this function return a value. It declares 3.0 functions, It has 3.... |
pasteorg_paste | ThreadPoolMixIn | public | 0 | 0 | process_request_in_thread | def process_request_in_thread(self, request, client_address):"""The worker thread should call back here to do the rest of therequest processing. Error handling normaller done in 'handle_request'must be done here."""try:self.finish_request(request, client_address)self.close_request(request)except BaseException as e:self... | 3 | 9 | 3 | 58 | 0 | 1,081 | 1,094 | 1,081 | self,request,client_address | [] | None | {"Expr": 5, "If": 1, "Try": 1} | 5 | 14 | 5 | ["self.finish_request", "self.close_request", "self.handle_error", "self.close_request", "isinstance"] | 0 | [] | The function (process_request_in_thread) defined within the public class called ThreadPoolMixIn.The function start at line 1081 and ends at 1094. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [1081.0] and does not return any value. It declares 5.0 functions, ... |
pasteorg_paste | ThreadPoolMixIn | public | 0 | 0 | serve_forever | def serve_forever(self):"""Overrides `serve_forever` to shut the threadpool down cleanly."""try:while self.running:try:self.handle_request()except socket.timeout:# Timeout is expected, gives interrupts a chance to# propogate, just keep handlingpassfinally:if hasattr(self, 'thread_pool'):self.thread_pool.shutdown() | 5 | 10 | 1 | 43 | 0 | 1,096 | 1,110 | 1,096 | self | [] | None | {"Expr": 3, "If": 1, "Try": 2, "While": 1} | 3 | 15 | 3 | ["self.handle_request", "hasattr", "self.thread_pool.shutdown"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95159979_LifeActor_ykdl.ykdl.util.rangefetch_server_py.LocalTCPServer.serve_forever"] | The function (serve_forever) defined within the public class called ThreadPoolMixIn.The function start at line 1096 and ends at 1110. It contains 10 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 3.0 functions, It has 3.0 funct... |
pasteorg_paste | ThreadPoolMixIn | public | 0 | 0 | server_activate | def server_activate(self):"""Overrides server_activate to set timeout on our listener socket."""# We set the timeout here so that we can trap interrupts on windowsself.socket.settimeout(1) | 1 | 2 | 1 | 14 | 0 | 1,112 | 1,117 | 1,112 | self | [] | None | {"Expr": 2} | 1 | 6 | 1 | ["self.socket.settimeout"] | 0 | [] | The function (server_activate) defined within the public class called ThreadPoolMixIn.The function start at line 1112 and ends at 1117. 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 declare 1.0 function, and It has 1.0 f... |
pasteorg_paste | ThreadPoolMixIn | public | 0 | 0 | server_close | def server_close(self):"""Finish pending requests and shutdown the server."""self.running = Falseself.socket.close()if hasattr(self, 'thread_pool'):self.thread_pool.shutdown(60) | 2 | 5 | 1 | 34 | 0 | 1,119 | 1,126 | 1,119 | self | [] | None | {"Assign": 1, "Expr": 3, "If": 1} | 3 | 8 | 3 | ["self.socket.close", "hasattr", "self.thread_pool.shutdown"] | 0 | [] | The function (server_close) defined within the public class called ThreadPoolMixIn.The function start at line 1119 and ends at 1126. 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. It declares 3.0 functions, and It has 3.0 fu... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, wsgi_application, server_address, RequestHandlerClass=None, ssl_context=None, request_queue_size=None):SecureHTTPServer.__init__(self, server_address,RequestHandlerClass, ssl_context,request_queue_size=request_queue_size)self.wsgi_application = wsgi_applicationself.wsgi_socket_timeout = None | 1 | 8 | 6 | 47 | 0 | 1,129 | 1,136 | 1,129 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "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 ContinueHook.The function start at line 1129 and ends at 1136. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 6 parameters, represented as [1129.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions... |
pasteorg_paste | WSGIServerBase | public | 0 | 1 | get_request | def get_request(self):# If there is a socket_timeout, set it on the accepted(conn,info) = SecureHTTPServer.get_request(self)if self.wsgi_socket_timeout:conn.settimeout(self.wsgi_socket_timeout)return (conn, info) | 2 | 5 | 1 | 36 | 0 | 1,138 | 1,143 | 1,138 | self | [] | Returns | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1} | 2 | 6 | 2 | ["SecureHTTPServer.get_request", "conn.settimeout"] | 204 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69847433_requests_cache_requests_cache.tests.unit.test_session_py.test_normalize_params__url", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.80560341_prozorroukr_openprocurement_api.src.openprocurement.api.database_... | The function (get_request) defined within the public class called WSGIServerBase, that inherit another class.The function start at line 1138 and ends at 1143. 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... |
pasteorg_paste | ContinueHook | public | 0 | 0 | __init__ | def __init__(self, wsgi_application, server_address, RequestHandlerClass=None, ssl_context=None, nworkers=10, daemon_threads=False, threadpool_options=None, request_queue_size=None):WSGIServerBase.__init__(self, wsgi_application, server_address,RequestHandlerClass, ssl_context,request_queue_size=request_queue_size)if t... | 2 | 11 | 9 | 73 | 0 | 1,149 | 1,159 | 1,149 | self,rfile,write | [] | None | {"Assign": 2, "Expr": 2, "For": 2, "If": 2} | 6 | 10 | 6 | ["hasattr", "setattr", "getattr", "hasattr", "setattr", "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 ContinueHook.The function start at line 1149 and ends at 1159. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 9 parameters, represented as [1149.0] and does not return any value. It declares 6.0 functions, It has 6.0 function... |
pasteorg_paste | public | public | 0 | 0 | serve | def serve(application, host=None, port=None, handler=None, ssl_pem=None,ssl_context=None, server_version=None, protocol_version=None,start_loop=True, daemon_threads=None, socket_timeout=None,use_threadpool=None, threadpool_workers=10,threadpool_options=None, request_queue_size=5):"""Serves your ``application`` over HTT... | 29 | 75 | 15 | 481 | 11 | 1,167 | 1,361 | 1,167 | application,host,port,handler,ssl_pem,ssl_context,server_version,protocol_version,start_loop,daemon_threads,socket_timeout,use_threadpool,threadpool_workers,threadpool_options,request_queue_size | ['protocol', 'server_address', 'is_ssl', 'port', 'ssl_context', 'is_ipv6', 'server', 'host', 'use_threadpool', 'idx', 'handler'] | Returns | {"Assign": 29, "Expr": 6, "If": 18, "Return": 1, "Try": 1} | 24 | 195 | 24 | ["int", "_auto_ssl_context", "SSL.Context", "ssl_context.use_privatekey_file", "ssl_context.use_certificate_chain_file", "host.count", "host.split", "host.find", "len", "host.rsplit", "strip", "host.strip", "strip", "host.strip", "int", "converters.asbool", "WSGIThreadPoolServer", "int", "WSGIServer", "int", "converter... | 26 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707931_jonashaag_klaus.tests.test_blame_py.test_blame", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707931_jonashaag_klaus.tests.test_blame_py.test_blame_empty", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Crea... | The function (serve) defined within the public class called public.The function start at line 1167 and ends at 1361. It contains 75 lines of code and it has a cyclomatic complexity of 29. It takes 15 parameters, represented as [1167.0], and this function return a value. It declares 24.0 functions, It has 24.0 functions... |
pasteorg_paste | public | public | 0 | 0 | server_runner | def server_runner(wsgi_app, global_conf, **kwargs):from paste.deploy.converters import asboolfor name in ['port', 'socket_timeout', 'threadpool_workers', 'threadpool_hung_thread_limit', 'threadpool_kill_thread_limit', 'threadpool_dying_limit', 'threadpool_spawn_if_under', 'threadpool_max_zombie_threads_before_die', 'th... | 10 | 24 | 3 | 170 | 1 | 1,366 | 1,389 | 1,366 | wsgi_app,global_conf,**kwargs | ['threadpool_options'] | None | {"Assign": 6, "Expr": 1, "For": 3, "If": 4} | 7 | 24 | 7 | ["int", "asbool", "list", "kwargs.items", "name.startswith", "len", "serve"] | 0 | [] | The function (server_runner) defined within the public class called public.The function start at line 1366 and ends at 1389. It contains 24 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [1366.0] and does not return any value. It declares 7.0 functions, and It has 7.0 fun... |
pasteorg_paste | public | public | 0 | 0 | middleware.middleware.lint_app.start_response_wrapper | def start_response_wrapper(*args, **kw):assert len(args) == 2 or len(args) == 3, ("Invalid number of arguments: %s" % args)assert not kw, "No keyword arguments allowed"status = args[0]headers = args[1]if len(args) == 3:exc_info = args[2]else:exc_info = Nonecheck_status(status)check_headers(headers)check_content_type(st... | 3 | 16 | 2 | 98 | 0 | 147 | 164 | 147 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (middleware.middleware.lint_app.start_response_wrapper) defined within the public class called public.The function start at line 147 and ends at 164. It contains 16 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [147.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | middleware.lint_app | def lint_app(*args, **kw):assert len(args) == 2, "Two arguments required"assert not kw, "No keyword arguments allowed"environ, start_response = argscheck_environ(environ)# We use this to check if the application returns without# calling start_response:start_response_started = []def start_response_wrapper(*args, **kw):a... | 2 | 14 | 2 | 94 | 0 | 136 | 175 | 136 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (middleware.lint_app) defined within the public class called public.The function start at line 136 and ends at 175. It contains 14 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [136.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | middleware | def middleware(application, global_conf=None):"""When applied between a WSGI server and a WSGI application, thismiddleware will check for WSGI compliancy on a number of levels.This middleware does not modify the request or response in anyway, but will throw an AssertionError if anything seems off(except for a failure t... | 1 | 3 | 2 | 14 | 5 | 124 | 177 | 124 | application,global_conf | ['start_response_started', 'iterator', 'status', 'headers', 'exc_info'] | Returns | {"Assign": 9, "Expr": 8, "If": 1, "Return": 3} | 17 | 54 | 17 | ["len", "check_environ", "len", "len", "len", "check_status", "check_headers", "check_content_type", "check_exc_info", "start_response_started.append", "WriteWrapper", "start_response", "InputWrapper", "ErrorWrapper", "application", "check_iterator", "IteratorWrapper"] | 15 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712479_corvia_django_tenant_users.tests.test_tenants.test_middleware_py.TestTenantAccessMiddleware.test_authenticated_user_no_access", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3712479_corvia_django_tenant_user... | The function (middleware) defined within the public class called public.The function start at line 124 and ends at 177. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [124.0], and this function return a value. It declares 17.0 functions, It has 17.0 functions ... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, wsgi_input):self.input = wsgi_input | 1 | 2 | 2 | 12 | 0 | 181 | 182 | 181 | self,wsgi_input | [] | 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 InputWrapper.The function start at line 181 and ends at 182. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [181.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | InputWrapper | public | 0 | 0 | read | def read(self, *args):assert len(args) <= 1v = self.input.read(*args)assert isinstance(v, bytes)return v | 1 | 5 | 2 | 35 | 0 | 184 | 188 | 184 | self,*args | [] | Returns | {"Assign": 1, "Return": 1} | 3 | 5 | 3 | ["len", "self.input.read", "isinstance"] | 423 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.dbus_unit_test_py.dbus_cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3474748_nzjrs_gnome_tweak_tool.gtweak.utils_py.AutostartFile.is_start_at_login_enabled", ... | The function (read) defined within the public class called InputWrapper.The function start at line 184 and ends at 188. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [184.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions ca... |
pasteorg_paste | InputWrapper | public | 0 | 0 | readline | def readline(self, *args):v = self.input.readline(*args)assert isinstance(v, bytes)return v | 1 | 4 | 2 | 28 | 0 | 190 | 193 | 190 | self,*args | [] | Returns | {"Assign": 1, "Return": 1} | 2 | 4 | 2 | ["self.input.readline", "isinstance"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py._tokenize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py.detect_encoding", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cr... | The function (readline) defined within the public class called InputWrapper.The function start at line 190 and ends at 193. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [190.0], and this function return a value. It declares 2.0 functions, It has 2.0 function... |
pasteorg_paste | InputWrapper | public | 0 | 0 | readlines | def readlines(self, *args):assert len(args) <= 1lines = self.input.readlines(*args)assert isinstance(lines, list)for line in lines:assert isinstance(line, bytes)return lines | 2 | 7 | 2 | 47 | 0 | 195 | 201 | 195 | self,*args | [] | Returns | {"Assign": 1, "For": 1, "Return": 1} | 4 | 7 | 4 | ["len", "self.input.readlines", "isinstance", "isinstance"] | 18 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.examples.resources.scripts.s3_profiler_py.run_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.jobs.metrics.instrumenters.env_py.EnvPlugin.job... | The function (readlines) defined within the public class called InputWrapper.The function start at line 195 and ends at 201. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [195.0], and this function return a value. It declares 4.0 functions, It has 4.0 functio... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __iter__ | def __iter__(self):while 1:line = self.readline()if not line:returnyield line | 3 | 6 | 1 | 22 | 0 | 203 | 208 | 203 | self | [] | None | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1, "While": 1} | 1 | 6 | 1 | ["self.readline"] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.AttrList.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForei... | The function (__iter__) defined within the public class called InputWrapper.The function start at line 203 and ends at 208. It contains 6 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 declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | InputWrapper | public | 0 | 0 | close | def close(self):assert 0, "input.close() must not be called" | 1 | 2 | 1 | 9 | 0 | 210 | 211 | 210 | self | [] | None | {} | 0 | 2 | 0 | [] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.presenters.formats_py.text", "_.content.gdrive.MyDrive.Phd_Th... | The function (close) defined within the public class called InputWrapper.The function start at line 210 and ends at 211. 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 158.0 functions calling this function which are ["... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, wsgi_input):self.input = wsgi_input | 1 | 2 | 2 | 12 | 0 | 215 | 216 | 181 | self,wsgi_input | [] | 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 InputWrapper.The function start at line 215 and ends at 216. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [181.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | write | def write(self, s):assert isinstance(s, str)self.errors.write(s) | 1 | 3 | 2 | 22 | 0 | 218 | 220 | 218 | self,s | [] | None | {"Expr": 1} | 2 | 3 | 2 | ["isinstance", "self.errors.write"] | 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 ErrorWrapper.The function start at line 218 and ends at 220. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [218.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions calle... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | flush | def flush(self):self.errors.flush() | 1 | 2 | 1 | 12 | 0 | 222 | 223 | 222 | self | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.errors.flush"] | 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 ErrorWrapper.The function start at line 222 and ends at 223. 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 declare 1.0 function, It has 1.0 function called insid... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | writelines | def writelines(self, seq):for line in seq:self.write(line) | 2 | 3 | 2 | 18 | 0 | 225 | 227 | 225 | self,seq | [] | None | {"Expr": 1, "For": 1} | 1 | 3 | 1 | ["self.write"] | 0 | [] | The function (writelines) defined within the public class called ErrorWrapper.The function start at line 225 and ends at 227. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [225.0] and does not return any value. It declare 1.0 function, and It has 1.0 functio... |
pasteorg_paste | InputWrapper | public | 0 | 0 | close | def close(self):assert 0, "input.close() must not be called" | 1 | 2 | 1 | 9 | 0 | 229 | 230 | 210 | self | [] | None | {} | 0 | 2 | 0 | [] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.presenters.formats_py.text", "_.content.gdrive.MyDrive.Phd_Th... | The function (close) defined within the public class called InputWrapper.The function start at line 229 and ends at 230. 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 158.0 functions calling this function which are ["... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, wsgi_input):self.input = wsgi_input | 1 | 2 | 2 | 12 | 0 | 234 | 235 | 181 | self,wsgi_input | [] | 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 InputWrapper.The function start at line 234 and ends at 235. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [181.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | WriteWrapper | public | 0 | 0 | __call__ | def __call__(self, s):assert isinstance(s, bytes)self.writer(s) | 1 | 3 | 2 | 20 | 0 | 237 | 239 | 237 | self,s | [] | None | {"Expr": 1} | 2 | 3 | 2 | ["isinstance", "self.writer"] | 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 WriteWrapper.The function start at line 237 and ends at 239. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [237.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions ca... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, wsgi_input):self.input = wsgi_input | 1 | 2 | 2 | 12 | 0 | 243 | 244 | 181 | self,wsgi_input | [] | 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 InputWrapper.The function start at line 243 and ends at 244. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [181.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __iter__ | def __iter__(self):# We want to make sure __iter__ is calledreturn IteratorWrapper(self.iterator) | 1 | 2 | 1 | 12 | 0 | 246 | 248 | 246 | self | [] | None | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1, "While": 1} | 1 | 6 | 1 | ["self.readline"] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.AttrList.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForei... | The function (__iter__) defined within the public class called InputWrapper.The function start at line 246 and ends at 248. 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 declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, wsgi_iterator, check_start_response):self.original_iterator = wsgi_iteratorself.iterator = iter(wsgi_iterator)self.closed = Falseself.check_start_response = check_start_response | 1 | 5 | 3 | 32 | 0 | 252 | 256 | 252 | self,wsgi_input | [] | 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 InputWrapper.The function start at line 252 and ends at 256. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [252.0] and does not return any value. It has 6814.0 functions calling this function whic... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __iter__ | def __iter__(self):return self | 1 | 2 | 1 | 7 | 0 | 258 | 259 | 258 | self | [] | None | {"Assign": 1, "Expr": 1, "If": 1, "Return": 1, "While": 1} | 1 | 6 | 1 | ["self.readline"] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.AttrList.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForei... | The function (__iter__) defined within the public class called InputWrapper.The function start at line 258 and ends at 259. 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 declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | IteratorWrapper | public | 0 | 0 | next | def next(self):assert not self.closed, ("Iterator read after closed")v = next(self.iterator)if self.check_start_response is not None:assert self.check_start_response, ("The application returns and we started iterating over its body, but start_response has not yet been called")self.check_start_response = Nonereturn v | 2 | 9 | 1 | 45 | 0 | 261 | 269 | 261 | self | [] | Returns | {"Assign": 2, "If": 1, "Return": 1} | 1 | 9 | 1 | ["next"] | 984 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Package.build_system", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.core.endpoint_py.Endpoint.get", "_.content... | The function (next) defined within the public class called IteratorWrapper.The function start at line 261 and ends at 269. 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 declare 1.0 function, It has 1.0 function called... |
pasteorg_paste | InputWrapper | public | 0 | 0 | close | def close(self):self.closed = Trueif hasattr(self.original_iterator, 'close'):self.original_iterator.close() | 2 | 4 | 1 | 27 | 0 | 273 | 276 | 273 | self | [] | None | {} | 0 | 2 | 0 | [] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.presenters.formats_py.text", "_.content.gdrive.MyDrive.Phd_Th... | The function (close) defined within the public class called InputWrapper.The function start at line 273 and ends at 276. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It has 158.0 functions calling this function which are ["... |
pasteorg_paste | IteratorWrapper | public | 0 | 0 | __del__ | def __del__(self):if not self.closed:sys.stderr.write("Iterator garbage collected without being closed")assert self.closed, ("Iterator garbage collected without being closed") | 2 | 6 | 1 | 27 | 0 | 278 | 283 | 278 | self | [] | None | {"Expr": 1, "If": 1} | 1 | 6 | 1 | ["sys.stderr.write"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3958607_irods_python_irodsclient.irods.test.login_auth_test_must_run_manually_py.TestMiscellaneous.test_destruct_session_with_no_pool_315"] | The function (__del__) defined within the public class called IteratorWrapper.The function start at line 278 and ends at 283. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declare 1.0 function, It has 1.0 function called ... |
pasteorg_paste | public | public | 0 | 0 | check_environ | def check_environ(environ):assert isinstance(environ,dict), ("Environment is not of the right type: %r (environment: %r)"% (type(environ), environ))for key in ['REQUEST_METHOD', 'SERVER_NAME', 'SERVER_PORT','wsgi.version', 'wsgi.input', 'wsgi.errors','wsgi.multithread', 'wsgi.multiprocess','wsgi.run_once']:assert key i... | 11 | 53 | 1 | 355 | 0 | 285 | 348 | 285 | environ | [] | None | {"Expr": 4, "For": 3, "If": 5} | 18 | 64 | 18 | ["isinstance", "type", "warnings.warn", "environ.keys", "isinstance", "type", "isinstance", "check_input", "check_errors", "warnings.warn", "environ.get", "startswith", "environ.get", "startswith", "environ.get", "int", "environ.get", "environ.get"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.middleware"] | The function (check_environ) defined within the public class called public.The function start at line 285 and ends at 348. It contains 53 lines of code and it has a cyclomatic complexity of 11. The function does not take any parameters and does not return any value. It declares 18.0 functions, It has 18.0 functions cal... |
pasteorg_paste | public | public | 0 | 0 | check_input | def check_input(wsgi_input):for attr in ['read', 'readline', 'readlines', '__iter__']:assert hasattr(wsgi_input, attr), ("wsgi.input (%r) doesn't have the attribute %s"% (wsgi_input, attr)) | 2 | 5 | 1 | 35 | 0 | 350 | 354 | 350 | wsgi_input | [] | None | {"For": 1} | 1 | 5 | 1 | ["hasattr"] | 13 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70408386_unionai_oss_pandera.asv_bench.benchmarks.dataframe_schema_py.Decorators.mem_check_input", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70408386_unionai_oss_pandera.asv_bench.benchmarks.dataframe_schema_py.... | The function (check_input) defined within the public class called public.The function start at line 350 and ends at 354. 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. It declare 1.0 function, It has 1.0 function called insid... |
pasteorg_paste | public | public | 0 | 0 | check_errors | def check_errors(wsgi_errors):for attr in ['flush', 'write', 'writelines']:assert hasattr(wsgi_errors, attr), ("wsgi.errors (%r) doesn't have the attribute %s"% (wsgi_errors, attr)) | 2 | 5 | 1 | 33 | 0 | 356 | 360 | 356 | wsgi_errors | [] | None | {"For": 1} | 1 | 5 | 1 | ["hasattr"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.check_environ"] | The function (check_errors) defined within the public class called public.The function start at line 356 and ends at 360. 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. It declare 1.0 function, It has 1.0 function called insi... |
pasteorg_paste | public | public | 0 | 0 | check_status | def check_status(status):assert isinstance(status, str), ("Status must be a string (not %r)" % status)# Implicitly check that we can turn it into an integer:status_code = status.split(None, 1)[0]assert len(status_code) == 3, ("Status codes must be three characters: %r" % status_code)status_int = int(status_code)assert ... | 3 | 13 | 1 | 84 | 2 | 362 | 375 | 362 | status | ['status_int', 'status_code'] | None | {"Assign": 2, "Expr": 1, "If": 1} | 6 | 14 | 6 | ["isinstance", "status.split", "len", "int", "len", "warnings.warn"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.middleware"] | The function (check_status) defined within the public class called public.The function start at line 362 and ends at 375. It contains 13 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 6.0 functions, It has 6.0 functions called ... |
pasteorg_paste | public | public | 0 | 0 | check_headers | def check_headers(headers):assert isinstance(headers,list), ("Headers (%r) must be of type list: %r"% (headers, type(headers)))header_names = {}for item in headers:assert isinstance(item, tuple), ("Individual headers (%r) must be of type tuple: %r"% (item, type(item)))assert len(item) == 2name, value = itemassert name.... | 4 | 24 | 1 | 169 | 1 | 377 | 400 | 377 | headers | ['header_names'] | None | {"Assign": 3, "For": 1} | 13 | 24 | 13 | ["isinstance", "type", "isinstance", "type", "len", "name.lower", "name.lower", "header_re.search", "name.endswith", "name.endswith", "bad_header_value_re.search", "group", "bad_header_value_re.search"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.middleware"] | The function (check_headers) defined within the public class called public.The function start at line 377 and ends at 400. It contains 24 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value. It declares 13.0 functions, It has 13.0 functions call... |
pasteorg_paste | public | public | 0 | 0 | check_content_type | def check_content_type(status, headers):code = int(status.split(None, 1)[0])# @@: need one more person to verify this interpretation of RFC 2616# http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.htmlNO_MESSAGE_BODY = (204, 304)NO_MESSAGE_TYPE = (204, 304)for name, value in headers:if name.lower() == 'content-type':if ... | 5 | 12 | 2 | 83 | 3 | 402 | 415 | 402 | status,headers | ['NO_MESSAGE_TYPE', 'code', 'NO_MESSAGE_BODY'] | None | {"Assign": 3, "For": 1, "If": 3, "Return": 1} | 3 | 14 | 3 | ["int", "status.split", "name.lower"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.middleware"] | The function (check_content_type) defined within the public class called public.The function start at line 402 and ends at 415. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [402.0] and does not return any value. It declares 3.0 functions, It has 3.0 functio... |
pasteorg_paste | public | public | 0 | 0 | check_exc_info | def check_exc_info(exc_info):assert exc_info is None or type(exc_info) is type(()), ("exc_info (%r) is not a tuple: %r" % (exc_info, type(exc_info))) | 2 | 3 | 1 | 33 | 0 | 417 | 419 | 417 | exc_info | [] | None | {} | 3 | 3 | 3 | ["type", "type", "type"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.middleware"] | The function (check_exc_info) defined within the public class called public.The function start at line 417 and ends at 419. It contains 3 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 3.0 functions, It has 3.0 functions called... |
pasteorg_paste | public | public | 0 | 0 | check_iterator | def check_iterator(iterator):# Technically a string is legal, which is why it's a really bad# idea, because it may cause the response to be returned# character-by-characterassert not isinstance(iterator, str), ("You should not return a string as your application iterator, ""instead return a single-item list containing ... | 1 | 4 | 1 | 18 | 0 | 422 | 428 | 422 | iterator | [] | None | {} | 1 | 7 | 1 | ["isinstance"] | 1 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.lint_py.middleware"] | The function (check_iterator) defined within the public class called public.The function start at line 422 and ends at 428. It contains 4 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 declare 1.0 function, It has 1.0 function called in... |
pasteorg_paste | public | public | 0 | 0 | make_middleware | def make_middleware(application, global_conf):# @@: global_conf should be taken out of the middleware function,# and isolated herereturn middleware(application) | 1 | 2 | 2 | 12 | 0 | 430 | 433 | 430 | application,global_conf | [] | Returns | {"Return": 1} | 1 | 4 | 1 | ["middleware"] | 4 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687462_toscawidgets_tw2_core.tests.test_middleware_py.TestMiddleware.testMakeMiddelware", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687462_toscawidgets_tw2_core.tests.test_validation_py.TestValidationError.set... | The function (make_middleware) defined within the public class called public.The function start at line 430 and ends at 433. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [430.0], and this function return a value. It declare 1.0 function, It has 1.0 function ... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, req):self.req = req | 1 | 2 | 2 | 12 | 0 | 62 | 63 | 62 | self,req | [] | 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 InputWrapper.The function start at line 62 and ends at 63. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [62.0] and does not return any value. It has 6814.0 functions calling this function which a... |
pasteorg_paste | InputWrapper | public | 0 | 0 | close | def close(self):pass | 1 | 2 | 1 | 6 | 0 | 65 | 66 | 65 | self | [] | None | {} | 0 | 2 | 0 | [] | 158 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.tearDown", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.presenters.formats_py.text", "_.content.gdrive.MyDrive.Phd_Th... | The function (close) defined within the public class called InputWrapper.The function start at line 65 and ends at 66. 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 158.0 functions calling this function which are ["_.... |
pasteorg_paste | InputWrapper | public | 0 | 0 | read | def read(self, size=-1):return self.req.read(size) | 1 | 2 | 2 | 19 | 0 | 68 | 69 | 68 | self,size | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.req.read"] | 423 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.dbus_unit_test_py.dbus_cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3474748_nzjrs_gnome_tweak_tool.gtweak.utils_py.AutostartFile.is_start_at_login_enabled", ... | The function (read) defined within the public class called InputWrapper.The function start at line 68 and ends at 69. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [68.0], and this function return a value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | InputWrapper | public | 0 | 0 | readline | def readline(self, size=-1):return self.req.readline(size) | 1 | 2 | 2 | 19 | 0 | 71 | 72 | 71 | self,size | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.req.readline"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py._tokenize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py.detect_encoding", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cr... | The function (readline) defined within the public class called InputWrapper.The function start at line 71 and ends at 72. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [71.0], and this function return a value. It declare 1.0 function, It has 1.0 function call... |
pasteorg_paste | InputWrapper | public | 0 | 0 | readlines | def readlines(self, hint=-1):return self.req.readlines(hint) | 1 | 2 | 2 | 19 | 0 | 74 | 75 | 74 | self,hint | [] | Returns | {"Return": 1} | 1 | 2 | 1 | ["self.req.readlines"] | 18 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.examples.resources.scripts.s3_profiler_py.run_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.jobs.metrics.instrumenters.env_py.EnvPlugin.job... | The function (readlines) defined within the public class called InputWrapper.The function start at line 74 and ends at 75. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [74.0], and this function return a value. It declare 1.0 function, It has 1.0 function cal... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __iter__ | def __iter__(self):line = self.readline()while line:yield line# Notice this won't prefetch the next line; it only# gets called if the generator is resumed.line = self.readline() | 2 | 5 | 1 | 24 | 0 | 77 | 83 | 77 | self | [] | None | {"Assign": 2, "Expr": 1, "While": 1} | 2 | 7 | 2 | ["self.readline", "self.readline"] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.AttrList.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForei... | The function (__iter__) defined within the public class called InputWrapper.The function start at line 77 and ends at 83. 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. It declares 2.0 functions, It has 2.0 functions called i... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, req):self.req = req | 1 | 2 | 2 | 12 | 0 | 88 | 89 | 62 | self,req | [] | 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 InputWrapper.The function start at line 88 and ends at 89. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [62.0] and does not return any value. It has 6814.0 functions calling this function which a... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | flush | def flush(self):pass | 1 | 2 | 1 | 6 | 0 | 91 | 92 | 91 | 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 ErrorWrapper.The function start at line 91 and ends at 92. 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 ["_.co... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | write | def write(self, msg):self.req.log_error(msg) | 1 | 2 | 2 | 15 | 0 | 94 | 95 | 94 | self,msg | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.req.log_error"] | 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 ErrorWrapper.The function start at line 94 and ends at 95. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [94.0] and does not return any value. It declare 1.0 function, It has 1.0 function called insi... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | writelines | def writelines(self, seq):self.write(''.join(seq)) | 1 | 2 | 2 | 18 | 0 | 97 | 98 | 97 | self,seq | [] | None | {"Expr": 1} | 2 | 2 | 2 | ["self.write", "join"] | 0 | [] | The function (writelines) defined within the public class called ErrorWrapper.The function start at line 97 and ends at 98. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [97.0] and does not return any value. It declares 2.0 functions, and It has 2.0 function... |
pasteorg_paste | InputWrapper | public | 0 | 0 | __init__ | def __init__(self, req):self.started = Falseoptions = req.get_options()# Threading and forkingtry:q = apache.mpm_querythreaded = q(apache.AP_MPMQ_IS_THREADED)forked = q(apache.AP_MPMQ_IS_FORKED)except AttributeError:threaded = options.get('multithread', '').lower()if threaded == 'on':threaded = Trueelif threaded == 'of... | 8 | 40 | 2 | 267 | 0 | 107 | 155 | 107 | self,req | [] | 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 InputWrapper.The function start at line 107 and ends at 155. It contains 40 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [107.0] and does not return any value. It has 6814.0 functions calling this function whi... |
pasteorg_paste | Handler | public | 0 | 0 | run | def run(self, application):try:result = application(self.environ, self.start_response)for data in result:self.write(data)if not self.started:self.request.set_content_length(0)if hasattr(result, 'close'):result.close()except Exception:traceback.print_exc(None, self.environ['wsgi.errors'])if not self.started:self.request... | 6 | 17 | 2 | 117 | 0 | 157 | 173 | 157 | self,application | [] | None | {"Assign": 4, "Expr": 6, "For": 1, "If": 3, "Try": 1} | 9 | 17 | 9 | ["application", "self.write", "self.request.set_content_length", "hasattr", "result.close", "traceback.print_exc", "self.request.set_content_length", "len", "self.request.write"] | 506 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3514474_ntfreedom_neverendshadowsocks.shadowsocks.manager_py.run", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535523_dbcli_vcli.tests.test_vexecute_py.test_bools_are_treated_as_strings", "_.content.gdrive.MyDriv... | The function (run) defined within the public class called Handler.The function start at line 157 and ends at 173. It contains 17 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [157.0] and does not return any value. It declares 9.0 functions, It has 9.0 functions called insi... |
pasteorg_paste | Handler | public | 0 | 0 | start_response | def start_response(self, status, headers, exc_info=None):if exc_info:try:if self.started:raise exc_infofinally:exc_info = Noneself.request.status = int(status[:3])for key, val in headers:if key.lower() == 'content-length':self.request.set_content_length(int(val))elif key.lower() == 'content-type':self.request.content_t... | 7 | 16 | 4 | 105 | 0 | 175 | 193 | 175 | self,status,headers,exc_info | [] | Returns | {"Assign": 3, "Expr": 2, "For": 1, "If": 4, "Return": 1, "Try": 1} | 6 | 19 | 6 | ["int", "key.lower", "self.request.set_content_length", "int", "key.lower", "self.request.headers_out.add"] | 89 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.tests.test_middleware_py.TestRelation._wsgi_create_object", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3696868_turbogears_ming.ming.tests.test_middleware_py.TestRelation._wsgi_remove_... | The function (start_response) defined within the public class called Handler.The function start at line 175 and ends at 193. It contains 16 lines of code and it has a cyclomatic complexity of 7. It takes 4 parameters, represented as [175.0], and this function return a value. It declares 6.0 functions, It has 6.0 functi... |
pasteorg_paste | ErrorWrapper | public | 0 | 0 | write | def write(self, data):if not self.started:self.started = Trueself.request.write(data) | 2 | 4 | 2 | 26 | 0 | 195 | 198 | 195 | self,msg | [] | None | {"Expr": 1} | 1 | 2 | 1 | ["self.req.log_error"] | 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 ErrorWrapper.The function start at line 195 and ends at 198. It contains 4 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [195.0] and does not return any value. It declare 1.0 function, It has 1.0 function called i... |
pasteorg_paste | public | public | 0 | 0 | handler.cleaner | def cleaner(data):cleanup() | 1 | 2 | 1 | 8 | 0 | 225 | 226 | 225 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (handler.cleaner) defined within the public class called public.The function start at line 225 and ends at 226. 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 | handler | def handler(req):options = req.get_options()# Run a startup function if requested.global startupif 'wsgi.startup' in options and not startup:func = options['wsgi.startup']if func:module_name, object_str = func.split('::', 1)module = __import__(module_name, globals(), locals(), [''])startup = apache.resolve_object(modul... | 12 | 36 | 1 | 261 | 8 | 205 | 252 | 205 | req | ['appini', 'app', 'cleanup', 'func', 'startup', 'appwsgi', 'module', 'options'] | Returns | {"Assign": 17, "Expr": 5, "If": 7, "Return": 1, "Try": 1} | 25 | 48 | 25 | ["req.get_options", "func.split", "__import__", "globals", "locals", "apache.resolve_object", "startup", "func.split", "__import__", "globals", "locals", "apache.resolve_object", "cleanup", "apache.register_cleanup", "req.server.register_cleanup", "options.get", "loadapp", "options.get", "appwsgi.split", "__import__", ... | 71 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.protocol.irc_py.IRCClient.recv_message", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470350_lincolnloop_django_debug_logging.debug_logging.settings_py._get_logging_config", "_.cont... | The function (handler) defined within the public class called public.The function start at line 205 and ends at 252. It contains 36 lines of code and it has a cyclomatic complexity of 12. The function does not take any parameters, and this function return a value. It declares 25.0 functions, It has 25.0 functions calle... |
pasteorg_paste | PonyMiddleware | public | 0 | 0 | __init__ | def __init__(self, application):self.application = application | 1 | 2 | 2 | 12 | 0 | 30 | 31 | 30 | self,application | [] | 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 PonyMiddleware.The function start at line 30 and ends at 31. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [30.0] and does not return any value. It has 6814.0 functions calling this function which... |
pasteorg_paste | PonyMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):path_info = environ.get('PATH_INFO', '')if path_info == '/pony':url = construct_url(environ, with_query_string=False)if 'horn' in environ.get('QUERY_STRING', ''):data = UNICORNlink = 'remove horn!'else:data = PONYurl += '?horn'link = 'add horn!'msg = data.decode('base64').dec... | 3 | 18 | 3 | 114 | 0 | 33 | 50 | 33 | self,environ,start_response | [] | Returns | {"Assign": 8, "AugAssign": 1, "Expr": 1, "If": 2, "Return": 2} | 7 | 18 | 7 | ["environ.get", "construct_url", "environ.get", "decode", "data.decode", "start_response", "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 PonyMiddleware.The function start at line 33 and ends at 50. It contains 18 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [33.0], and this function return a value. It declares 7.0 functions, It has 7.0 function... |
pasteorg_paste | public | public | 0 | 0 | make_pony | def make_pony(app, global_conf):"""Adds pony power to any application, at /pony"""return PonyMiddleware(app) | 1 | 2 | 2 | 13 | 0 | 52 | 56 | 52 | app,global_conf | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 5 | 1 | ["PonyMiddleware"] | 0 | [] | The function (make_pony) defined within the public class called public.The function start at line 52 and ends at 56. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [52.0], and this function return a value. It declare 1.0 function, and It has 1.0 function call... |
pasteorg_paste | _ProgressFile | protected | 0 | 0 | __init__ | def __init__(self, environ, rfile):self._ProgressFile_environ = environself._ProgressFile_rfile = rfileself.flush = rfile.flushself.write = rfile.writeself.writelines = rfile.writelines | 1 | 6 | 3 | 40 | 0 | 49 | 54 | 49 | self,environ,rfile | [] | None | {"Assign": 5} | 0 | 6 | 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 protected class called _ProgressFile.The function start at line 49 and ends at 54. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [49.0] and does not return any value. It has 6814.0 functions calling this function whi... |
pasteorg_paste | public | public | 0 | 0 | __iter__.iterwrap | def iterwrap():for chunk in riter:environ[ENVIRON_RECEIVED] += len(chunk)yield chunk | 2 | 4 | 0 | 20 | 0 | 59 | 62 | 59 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__iter__.iterwrap) defined within the public class called public.The function start at line 59 and ends at 62. It contains 4 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 | _ProgressFile | protected | 0 | 0 | __iter__ | def __iter__(self):environ = self._ProgressFile_environriter = iter(self._ProgressFile_rfile)def iterwrap():for chunk in riter:environ[ENVIRON_RECEIVED] += len(chunk)yield chunkreturn iter(iterwrap) | 1 | 5 | 1 | 25 | 0 | 56 | 63 | 56 | self | [] | Returns | {"Assign": 2, "AugAssign": 1, "Expr": 1, "For": 1, "Return": 1} | 3 | 8 | 3 | ["iter", "len", "iter"] | 17 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.AttrList.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForei... | The function (__iter__) defined within the protected class called _ProgressFile.The function start at line 56 and ends at 63. It contains 5 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 ... |
pasteorg_paste | _ProgressFile | protected | 0 | 0 | read | def read(self, size=-1):chunk = self._ProgressFile_rfile.read(size)self._ProgressFile_environ[ENVIRON_RECEIVED] += len(chunk)return chunk | 1 | 4 | 2 | 33 | 0 | 65 | 68 | 65 | self,size | [] | Returns | {"Assign": 1, "AugAssign": 1, "Return": 1} | 2 | 4 | 2 | ["self._ProgressFile_rfile.read", "len"] | 423 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.dbus_unit_test_py.dbus_cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3474748_nzjrs_gnome_tweak_tool.gtweak.utils_py.AutostartFile.is_start_at_login_enabled", ... | The function (read) defined within the protected class called _ProgressFile.The function start at line 65 and ends at 68. It contains 4 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 2.0 functions, It has 2.0 functions c... |
pasteorg_paste | _ProgressFile | protected | 0 | 0 | readline | def readline(self):chunk = self._ProgressFile_rfile.readline()self._ProgressFile_environ[ENVIRON_RECEIVED] += len(chunk)return chunk | 1 | 4 | 1 | 27 | 0 | 70 | 73 | 70 | self | [] | Returns | {"Assign": 1, "AugAssign": 1, "Return": 1} | 2 | 4 | 2 | ["self._ProgressFile_rfile.readline", "len"] | 5 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py._tokenize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.tokenize_py.detect_encoding", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cr... | The function (readline) defined within the protected class called _ProgressFile.The function start at line 70 and ends at 73. 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 2.0 functions, It has 2.0 functions ... |
pasteorg_paste | _ProgressFile | protected | 0 | 0 | readlines | def readlines(self, hint=None):chunk = self._ProgressFile_rfile.readlines(hint)self._ProgressFile_environ[ENVIRON_RECEIVED] += len(chunk)return chunk | 1 | 4 | 2 | 32 | 0 | 75 | 78 | 75 | self,hint | [] | Returns | {"Assign": 1, "AugAssign": 1, "Return": 1} | 2 | 4 | 2 | ["self._ProgressFile_rfile.readlines", "len"] | 18 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.examples.resources.scripts.s3_profiler_py.run_command", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.jobs.metrics.instrumenters.env_py.EnvPlugin.job... | The function (readlines) defined within the protected class called _ProgressFile.The function start at line 75 and ends at 78. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [75.0], and this function return a value. It declares 2.0 functions, It has 2.0 functi... |
pasteorg_paste | _ProgressFile | protected | 0 | 0 | __init__ | def __init__(self, application, threshold=None, timeout=None):self.application = applicationself.threshold = threshold or DEFAULT_THRESHOLDself.timeout = timeout or DEFAULT_TIMEOUTself.monitor = [] | 3 | 5 | 4 | 40 | 0 | 132 | 136 | 132 | self,environ,rfile | [] | None | {"Assign": 5} | 0 | 6 | 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 protected class called _ProgressFile.The function start at line 132 and ends at 136. It contains 5 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [132.0] and does not return any value. It has 6814.0 functions calling this function ... |
pasteorg_paste | public | public | 0 | 0 | __call__.finalizer | def finalizer(exc_info=None):environ[REQUEST_FINISHED] = time.time() | 1 | 2 | 1 | 17 | 0 | 148 | 149 | 148 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__call__.finalizer) defined within the public class called public.The function start at line 148 and ends at 149. 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 | UploadProgressMonitor | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):length = environ.get('CONTENT_LENGTH', 0)if length and int(length) > self.threshold:# replace input file objectself.monitor.append(environ)environ[ENVIRON_RECEIVED] = 0environ[REQUEST_STARTED] = time.time()environ[REQUEST_FINISHED] = Noneenviron['wsgi.input'] = \_ProgressFile... | 3 | 13 | 3 | 102 | 0 | 138 | 152 | 138 | self,environ,start_response | [] | Returns | {"Assign": 6, "Expr": 1, "If": 1, "Return": 2} | 8 | 15 | 8 | ["environ.get", "int", "self.monitor.append", "time.time", "_ProgressFile", "time.time", "catch_errors", "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 UploadProgressMonitor.The function start at line 138 and ends at 152. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [138.0], and this function return a value. It declares 8.0 functions, It has 8.... |
pasteorg_paste | UploadProgressMonitor | public | 0 | 0 | uploads | def uploads(self):return self.monitor | 1 | 2 | 1 | 9 | 0 | 154 | 155 | 154 | self | [] | Returns | {"Return": 1} | 0 | 2 | 0 | [] | 0 | [] | The function (uploads) defined within the public class called UploadProgressMonitor.The function start at line 154 and ends at 155. 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.. |
pasteorg_paste | _ProgressFile | protected | 0 | 0 | __init__ | def __init__(self, monitor):self.monitor = monitor | 1 | 2 | 2 | 12 | 0 | 181 | 182 | 181 | self,environ,rfile | [] | None | {"Assign": 5} | 0 | 6 | 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 protected class called _ProgressFile.The function start at line 181 and ends at 182. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [181.0] and does not return any value. It has 6814.0 functions calling this function ... |
pasteorg_paste | UploadProgressReporter | public | 0 | 0 | match | def match(self, search_environ, upload_environ):if search_environ.get('REMOTE_USER', None) == \ upload_environ.get('REMOTE_USER', 0):return Truereturn False | 2 | 5 | 3 | 33 | 0 | 184 | 188 | 184 | self,search_environ,upload_environ | [] | Returns | {"If": 1, "Return": 2} | 2 | 5 | 2 | ["search_environ.get", "upload_environ.get"] | 56 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3593274_stevenproctor_planet_erlang.planet.vendor.html5lib.treebuilders.soup_py.testSerializer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3640381_floydhub_floyd_cli.floyd.client.files_py.matches_glob_list", "_.... | The function (match) defined within the public class called UploadProgressReporter.The function start at line 184 and ends at 188. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [184.0], and this function return a value. It declares 2.0 functions, It has 2.0 f... |
pasteorg_paste | UploadProgressReporter | public | 0 | 0 | report | def report(self, environ):retval = { 'started': time.strftime("%Y-%m-%d %H:%M:%S",time.gmtime(environ[REQUEST_STARTED])), 'finished': '', 'content_length': environ.get('CONTENT_LENGTH'), 'bytes_received': environ[ENVIRON_RECEIVED], 'path_info': environ.get('PATH_INFO',''), 'query_string': environ.get('QUERY_STRING','')... | 2 | 13 | 2 | 100 | 0 | 190 | 202 | 190 | self,environ | [] | Returns | {"Assign": 3, "If": 1, "Return": 1} | 7 | 13 | 7 | ["time.strftime", "time.gmtime", "environ.get", "environ.get", "environ.get", "time.strftime", "time.gmtime"] | 21 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3706078_confluentinc_ducktape.tests.runner.check_runner_py.CheckRunner.check_runner_report_junit", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.55413314_dbbs_lab_bsb.packages.bsb_arbor.bsb_arbor.adapter_py.ArborAda... | The function (report) defined within the public class called UploadProgressReporter.The function start at line 190 and ends at 202. It contains 13 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [190.0], and this function return a value. It declares 7.0 functions, It has 7.0... |
pasteorg_paste | UploadProgressMonitor | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):body = []for map in [self.report(env) for env in self.monitor.uploads() if self.match(environ, env)]:parts = []for k, v in map.items():v = str(v).replace("\\", "\\\\").replace('"', '\\"')parts.append('%s: "%s"' % (k, v))body.append("{ %s }" % ", ".join(parts))body = "[ %s ]" ... | 5 | 13 | 3 | 139 | 0 | 204 | 216 | 204 | self,environ,start_response | [] | Returns | {"Assign": 6, "Expr": 1, "If": 1, "Return": 2} | 8 | 15 | 8 | ["environ.get", "int", "self.monitor.append", "time.time", "_ProgressFile", "time.time", "catch_errors", "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 UploadProgressMonitor.The function start at line 204 and ends at 216. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [204.0], and this function return a value. It declares 8.0 functions, It has 8.... |
pasteorg_paste | Proxy | public | 0 | 0 | __init__ | def __init__(self, address, allowed_request_methods=(), suppress_http_headers=()): | 1 | 2 | 3 | 17 | 0 | 54 | 55 | 54 | self,address,allowed_request_methods,suppress_http_headers | [] | None | {"Assign": 7} | 4 | 12 | 4 | ["urlparse.urlsplit", "lower", "x.lower", "x.lower"] | 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 Proxy.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 3 parameters, represented as [54.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called insid... |
pasteorg_paste | Proxy | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):if (self.allowed_request_methods andenviron['REQUEST_METHOD'].lower() not in self.allowed_request_methods):return httpexceptions.HTTPBadRequest("Disallowed")(environ, start_response)if self.scheme == 'http':ConnClass = httplib.HTTPConnectionelif self.scheme == 'https':ConnCla... | 18 | 58 | 3 | 424 | 0 | 67 | 131 | 67 | self,environ,start_response | [] | Returns | {"Assign": 26, "AugAssign": 1, "Expr": 3, "For": 1, "If": 13, "Return": 2} | 27 | 65 | 27 | ["lower", "httpexceptions.HTTPBadRequest", "ValueError", "ConnClass", "environ.items", "key.startswith", "replace", "lower", "environ.get", "environ.get", "read", "str", "len", "int", "read", "quote", "urlparse.urljoin", "environ.get", "conn.request", "conn.getresponse", "parse_headers", "start_response", "res.getheade... | 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 Proxy.The function start at line 67 and ends at 131. It contains 58 lines of code and it has a cyclomatic complexity of 18. It takes 3 parameters, represented as [67.0], and this function return a value. It declares 27.0 functions, It has 27.0 functions cal... |
pasteorg_paste | public | public | 0 | 0 | make_proxy | def make_proxy(global_conf, address, allowed_request_methods="", suppress_http_headers=""):"""Make a WSGI application that proxies to another address:``address``the full URL ending with a trailing ``/````allowed_request_methods``:a space seperated list of request methods (e.g., ``GET POST``)``suppress_http_headers``a s... | 1 | 8 | 4 | 41 | 2 | 133 | 154 | 133 | global_conf,address,allowed_request_methods,suppress_http_headers | ['allowed_request_methods', 'suppress_http_headers'] | Returns | {"Assign": 2, "Expr": 1, "Return": 1} | 3 | 22 | 3 | ["aslist", "aslist", "Proxy"] | 0 | [] | The function (make_proxy) defined within the public class called public.The function start at line 133 and ends at 154. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [133.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functio... |
pasteorg_paste | Proxy | public | 0 | 0 | __init__ | def __init__(self, force_host=None, force_scheme='http'):self.force_host = force_hostself.force_scheme = force_scheme | 1 | 4 | 3 | 23 | 0 | 173 | 176 | 173 | self,address,allowed_request_methods,suppress_http_headers | [] | None | {"Assign": 7} | 4 | 12 | 4 | ["urlparse.urlsplit", "lower", "x.lower", "x.lower"] | 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 Proxy.The function start at line 173 and ends at 176. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [173.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called in... |
pasteorg_paste | TransparentProxy | public | 0 | 0 | __repr__ | def __repr__(self):return '<%s %s force_host=%r force_scheme=%r>' % (self.__class__.__name__,hex(id(self)),self.force_host, self.force_scheme) | 1 | 5 | 1 | 31 | 0 | 178 | 182 | 178 | self | [] | Returns | {"Return": 1} | 2 | 5 | 2 | ["hex", "id"] | 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 TransparentProxy.The function start at line 178 and ends at 182. It contains 5 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 function... |
pasteorg_paste | Proxy | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):scheme = environ['wsgi.url_scheme']if self.force_host is None:conn_scheme = schemeelse:conn_scheme = self.force_schemeif conn_scheme == 'http':ConnClass = httplib.HTTPConnectionelif conn_scheme == 'https':ConnClass = httplib.HTTPSConnectionelse:raise ValueError("Unknown schem... | 16 | 61 | 3 | 388 | 0 | 184 | 247 | 184 | self,environ,start_response | [] | Returns | {"Assign": 26, "AugAssign": 1, "Expr": 3, "For": 1, "If": 13, "Return": 2} | 27 | 65 | 27 | ["lower", "httpexceptions.HTTPBadRequest", "ValueError", "ConnClass", "environ.items", "key.startswith", "replace", "lower", "environ.get", "environ.get", "read", "str", "len", "int", "read", "quote", "urlparse.urljoin", "environ.get", "conn.request", "conn.getresponse", "parse_headers", "start_response", "res.getheade... | 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 Proxy.The function start at line 184 and ends at 247. It contains 61 lines of code and it has a cyclomatic complexity of 16. It takes 3 parameters, represented as [184.0], and this function return a value. It declares 27.0 functions, It has 27.0 functions c... |
pasteorg_paste | public | public | 0 | 0 | parse_headers | def parse_headers(message):"""Turn a Message object into a list of WSGI-style headers."""headers_out = []for header, value in message.items():if header.lower() not in filtered_headers:headers_out.append((header, value))return headers_out | 3 | 6 | 1 | 43 | 1 | 249 | 257 | 249 | message | ['headers_out'] | Returns | {"Assign": 1, "Expr": 2, "For": 1, "If": 1, "Return": 1} | 3 | 9 | 3 | ["message.items", "header.lower", "headers_out.append"] | 3 | ["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.76380898_stevenlooman_async_upnp_client.async_upnp_client.ssdp_py._cached_header_parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.proxy_py.Proxy.__call__", "_.content.gdrive.MyDriv... | The function (parse_headers) defined within the public class called public.The function start at line 249 and ends at 257. It contains 6 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 cal... |
pasteorg_paste | public | public | 0 | 0 | make_transparent_proxy | def make_transparent_proxy(global_conf, force_host=None, force_scheme='http'):"""Create a proxy that connects to a specific host, but doesabsolutely no other filtering, including the Host header."""return TransparentProxy(force_host=force_host,force_scheme=force_scheme) | 1 | 4 | 3 | 25 | 0 | 259 | 266 | 259 | global_conf,force_host,force_scheme | [] | Returns | {"Expr": 1, "Return": 1} | 1 | 8 | 1 | ["TransparentProxy"] | 0 | [] | The function (make_transparent_proxy) defined within the public class called public.The function start at line 259 and ends at 266. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [259.0], and this function return a value. It declare 1.0 function, and It has 1... |
pasteorg_paste | CheckForRecursionMiddleware | public | 0 | 0 | __init__ | def __init__(self, app, env):self.app = appself.env = env | 1 | 3 | 3 | 19 | 0 | 37 | 39 | 37 | self,app,env | [] | 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 CheckForRecursionMiddleware.The function start at line 37 and ends at 39. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [37.0] and does not return any value. It has 6814.0 functions calling this f... |
pasteorg_paste | CheckForRecursionMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):path_info = environ.get('PATH_INFO','')if path_info in self.env.get('paste.recursive.old_path_info', []):raise RecursionLoop("Forwarding loop detected; %r visited twice (internal ""redirect path: %s)"% (path_info, self.env['paste.recursive.old_path_info']))old_path_info = sel... | 2 | 11 | 3 | 88 | 0 | 41 | 51 | 41 | self,environ,start_response | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 7 | 11 | 7 | ["environ.get", "self.env.get", "RecursionLoop", "self.env.setdefault", "old_path_info.append", "self.env.get", "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 CheckForRecursionMiddleware.The function start at line 41 and ends at 51. It contains 11 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [41.0], and this function return a value. It declares 7.0 functions, It has... |
pasteorg_paste | CheckForRecursionMiddleware | public | 0 | 0 | __init__ | def __init__(self, application, global_conf=None):self.application = application | 1 | 2 | 3 | 16 | 0 | 65 | 66 | 65 | self,app,env | [] | 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 CheckForRecursionMiddleware.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 3 parameters, represented as [65.0] and does not return any value. It has 6814.0 functions calling this f... |
pasteorg_paste | CheckForRecursionMiddleware | public | 0 | 0 | __call__ | def __call__(self, environ, start_response):environ['paste.recursive.forward'] = Forwarder(self.application,environ,start_response)environ['paste.recursive.include'] = Includer(self.application,environ,start_response)environ['paste.recursive.include_app_iter'] = IncluderAppIter(self.application,environ,start_response)m... | 2 | 21 | 3 | 106 | 0 | 68 | 88 | 68 | self,environ,start_response | [] | Returns | {"Assign": 2, "Expr": 1, "If": 1, "Return": 1} | 7 | 11 | 7 | ["environ.get", "self.env.get", "RecursionLoop", "self.env.setdefault", "old_path_info.append", "self.env.get", "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 CheckForRecursionMiddleware.The function start at line 68 and ends at 88. It contains 21 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [68.0], and this function return a value. It declares 7.0 functions, It has... |
pasteorg_paste | public | public | 0 | 0 | __init__.__init__ | def __init__(self, app):self.app = app | 1 | 2 | 2 | 12 | 0 | 209 | 210 | 209 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.__init__) defined within the public class called public.The function start at line 209 and ends at 210. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [209.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __init__.__init__.factory_.__call__ | def __call__(self, environ, start_response):environ['PATH_INFO'] = preturn self.app(environ, start_response) | 1 | 3 | 3 | 24 | 0 | 217 | 219 | 217 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.__init__.factory_.__call__) defined within the public class called public.The function start at line 217 and ends at 219. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [217.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __init__.factory_ | def factory_(app):class PathInfoForward(ForwardRequestExceptionMiddleware):def __call__(self, environ, start_response):environ['PATH_INFO'] = preturn self.app(environ, start_response)return PathInfoForward(app) | 1 | 4 | 1 | 18 | 0 | 215 | 220 | 215 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.factory_) defined within the public class called public.The function start at line 215 and ends at 220. It contains 4 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 | __init__.__init__.factory_.__call__ | def __call__(self, environ, start_response):environ['PATH_INFO'] = url.split('?')[0]environ['QUERY_STRING'] = url.split('?')[1]return self.app(environ, start_response) | 1 | 4 | 3 | 46 | 0 | 225 | 228 | 225 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.__init__.factory_.__call__) defined within the public class called public.The function start at line 225 and ends at 228. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [225.0] and does not return any value.. |
pasteorg_paste | public | public | 0 | 0 | __init__.factory_ | def factory_(app):class PathInfoForward(ForwardRequestExceptionMiddleware):def __call__(self, environ, start_response):environ['PATH_INFO'] = preturn self.app(environ, start_response)return PathInfoForward(app) | 1 | 4 | 1 | 18 | 0 | 223 | 229 | 215 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.factory_) defined within the public class called public.The function start at line 223 and ends at 229. It contains 4 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 | __init__.__init__.factory_.__call__ | def __call__(self, environ_, start_response):return self.app(environ, start_response) | 1 | 2 | 3 | 18 | 0 | 234 | 235 | 234 | null | [] | None | null | 0 | 0 | 0 | null | 0 | null | The function (__init__.__init__.factory_.__call__) defined within the public class called public.The function start at line 234 and ends at 235. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [234.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.