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
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
232
236
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 232 and ends at 236. 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
CheckForRecursionMiddleware
public
0
0
__init__
def __init__(self,url=None,environ={},factory=None,path_info=None):# Check no incompatible options have been chosenif factory and url:raise TypeError('You cannot specify factory and a url in ''ForwardRequestException')elif factory and environ:raise TypeError('You cannot specify factory and environ in ''ForwardRequestEx...
14
43
5
153
0
172
239
172
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 172 and ends at 239. It contains 43 lines of code and it has a cyclomatic complexity of 14. It takes 5 parameters, represented as [172.0] and does not return any value. It has 6814.0 functions calling t...
pasteorg_paste
CheckForRecursionMiddleware
public
0
0
__init__
def __init__(self, application, environ, start_response):self.application = applicationself.original_environ = environ.copy()self.previous_environ = environself.start_response = start_response
1
5
4
35
0
243
247
243
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 243 and ends at 247. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [243.0] and does not return any value. It has 6814.0 functions calling thi...
pasteorg_paste
CheckForRecursionMiddleware
public
0
0
__call__
def __call__(self, path, extra_environ=None):"""`extra_environ` is an optional dictionary that is also addedto the forwarded request.E.g., ``{'HTTP_HOST': 'new.host'}``could be used to forward to a different virtual host."""environ = self.original_environ.copy()if extra_environ:environ.update(extra_environ)environ['pas...
3
19
3
139
0
249
272
249
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 249 and ends at 272. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [249.0], and this function return a value. It declares 7.0 functions, It ...
pasteorg_paste
Recursive
public
0
0
activate
def activate(self, environ):raise NotImplementedError
1
2
2
9
0
274
275
274
self,environ
[]
None
{}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.demo.demo.middleware_py.language_activator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.tests.test_templatetags_py.test_i18n", "_.content.gdrive.M...
The function (activate) defined within the public class called Recursive.The function start at line 274 and ends at 275. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [274.0] and does not return any value. It has 3.0 functions calling this function which are ...
pasteorg_paste
Recursive
public
0
0
__repr__
def __repr__(self):return '<%s.%s from %s>' % (self.__class__.__module__,self.__class__.__name__,self.original_environ.get('SCRIPT_NAME') or '/')
2
5
1
32
0
277
281
277
self
[]
Returns
{"Return": 1}
1
5
1
["self.original_environ.get"]
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 Recursive.The function start at line 277 and ends at 281. 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 declare 1.0 function, It has 1.0 function called i...
pasteorg_paste
Recursive
public
0
0
activate
def activate(self, environ):warnings.warn("recursive.Forwarder has been deprecated; please use ""ForwardRequestException",DeprecationWarning, 2)return self.application(environ, self.start_response)
1
6
2
29
0
302
307
302
self,environ
[]
None
{}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.demo.demo.middleware_py.language_activator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.tests.test_templatetags_py.test_i18n", "_.content.gdrive.M...
The function (activate) defined within the public class called Recursive.The function start at line 302 and ends at 307. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [302.0] and does not return any value. It has 3.0 functions calling this function which are ...
pasteorg_paste
public
public
0
0
activate.start_response
def start_response(status, headers, exc_info=None):if exc_info:raise exc_inforesponse.status = statusresponse.headers = headersreturn response.write
2
6
3
30
0
320
325
320
null
[]
None
null
0
0
0
null
0
null
The function (activate.start_response) defined within the public class called public.The function start at line 320 and ends at 325. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [320.0] and does not return any value..
pasteorg_paste
Recursive
public
0
0
activate
def activate(self, environ):response = IncludedResponse()def start_response(status, headers, exc_info=None):if exc_info:raise exc_inforesponse.status = statusresponse.headers = headersreturn response.writeapp_iter = self.application(environ, start_response)try:for s in app_iter:response.write(s)finally:if hasattr(app_i...
4
12
2
59
0
318
334
318
self,environ
[]
None
{}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.demo.demo.middleware_py.language_activator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.tests.test_templatetags_py.test_i18n", "_.content.gdrive.M...
The function (activate) defined within the public class called Recursive.The function start at line 318 and ends at 334. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [318.0] and does not return any value. It has 3.0 functions calling this function which are...
pasteorg_paste
CheckForRecursionMiddleware
public
0
0
__init__
def __init__(self):self.headers = Noneself.status = Noneself.output = StringIO()self.str = None
1
5
1
27
0
338
342
338
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 338 and ends at 342. It contains 5 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 6814.0 functions calling this fu...
pasteorg_paste
IncludedResponse
public
0
0
close
def close(self):self.str = self.output.getvalue()self.output.close()self.output = None
1
4
1
28
0
344
347
344
self
[]
None
{"Assign": 2, "Expr": 1}
2
4
2
["self.output.getvalue", "self.output.close"]
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 IncludedResponse.The function start at line 344 and ends at 347. 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 declares 2.0 functions, It has 2.0 functions calle...
pasteorg_paste
IncludedResponse
public
0
0
write
def write(self, s):assert self.output is not None, ("This response has already been closed and no further data ""can be written.")self.output.write(s)
1
5
2
27
0
349
353
349
self,s
[]
None
{"Expr": 1}
1
5
1
["self.output.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 IncludedResponse.The function start at line 349 and ends at 353. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [349.0] and does not return any value. It declare 1.0 function, It has 1.0 function call...
pasteorg_paste
IncludedResponse
public
0
0
__str__
def __str__(self):return self.body
1
2
1
9
0
355
356
355
self
[]
Returns
{"Return": 1}
0
2
0
[]
64
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15914487_netbox_community_pynetbox.pynetbox.models.ipam_py.Vlans.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.session_py.DynectSession.__str__", "_.content.gdrive.MyDrive....
The function (__str__) defined within the public class called IncludedResponse.The function start at line 355 and ends at 356. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It has 64.0 functions calling this function whi...
pasteorg_paste
IncludedResponse
public
0
0
body__get
def body__get(self):if self.str is None:return self.output.getvalue()else:return self.str
2
5
1
26
0
358
362
358
self
[]
Returns
{"If": 1, "Return": 2}
1
5
1
["self.output.getvalue"]
0
[]
The function (body__get) defined within the public class called IncludedResponse.The function start at line 358 and ends at 362. 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 declare 1.0 function, and It has 1.0 func...
pasteorg_paste
public
public
0
0
activate.start_response
def start_response(status, headers, exc_info=None):if exc_info:raise exc_inforesponse.status = statusresponse.headers = headersreturn response.write
2
6
3
30
0
374
379
320
null
[]
None
null
0
0
0
null
0
null
The function (activate.start_response) defined within the public class called public.The function start at line 374 and ends at 379. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [320.0] and does not return any value..
pasteorg_paste
Recursive
public
0
0
activate
def activate(self, environ):response = IncludedAppIterResponse()def start_response(status, headers, exc_info=None):if exc_info:raise exc_inforesponse.status = statusresponse.headers = headersreturn response.writeapp_iter = self.application(environ, start_response)response.app_iter = app_iterreturn response
1
6
2
31
0
372
382
372
self,environ
[]
None
{}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.demo.demo.middleware_py.language_activator", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3719314_idlesign_django_sitetree.tests.test_templatetags_py.test_i18n", "_.content.gdrive.M...
The function (activate) defined within the public class called Recursive.The function start at line 372 and ends at 382. It contains 6 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [372.0] and does not return any value. It has 3.0 functions calling this function which are ...
pasteorg_paste
CheckForRecursionMiddleware
public
0
0
__init__
def __init__(self):self.status = Noneself.headers = Noneself.accumulated = []self.app_iter = Noneself._closed = False
1
6
1
31
0
386
391
386
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 386 and ends at 391. It contains 6 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 6814.0 functions calling this fu...
pasteorg_paste
IncludedResponse
public
0
0
close
def close(self):assert not self._closed, ("Tried to close twice")if hasattr(self.app_iter, 'close'):self.app_iter.close()
2
5
1
31
0
393
397
393
self
[]
None
{"Assign": 2, "Expr": 1}
2
4
2
["self.output.getvalue", "self.output.close"]
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 IncludedResponse.The function start at line 393 and ends at 397. 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 calle...
pasteorg_paste
IncludedResponse
public
0
0
write
def write(self, s):self.accumulated.append
1
2
2
12
0
399
400
399
self,s
[]
None
{"Expr": 1}
1
5
1
["self.output.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 IncludedResponse.The function start at line 399 and ends at 400. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [399.0] and does not return any value. It declare 1.0 function, It has 1.0 function call...
pasteorg_paste
public
public
0
0
make_recursive_middleware
def make_recursive_middleware(app, global_conf):return RecursiveMiddleware(app)
1
2
2
12
0
402
403
402
app,global_conf
[]
Returns
{"Return": 1}
1
2
1
["RecursiveMiddleware"]
0
[]
The function (make_recursive_middleware) defined within the public class called public.The function start at line 402 and ends at 403. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [402.0], and this function return a value. It declare 1.0 function, and It ha...
pasteorg_paste
StackedObjectProxy
public
0
0
__init__
def __init__(self, default=NO_DEFAULT, name="Default"):"""Create a new StackedObjectProxyIf a default is given, its used in every thread if no other objecthas been pushed on."""self.__dict__['____name__'] = nameself.__dict__['____local__'] = threadinglocal.local()if default is not NO_DEFAULT:self.__dict__['____default_...
2
5
3
48
0
110
120
110
self,default,name
[]
None
{"Assign": 3, "Expr": 1, "If": 1}
1
11
1
["threadinglocal.local"]
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 StackedObjectProxy.The function start at line 110 and ends at 120. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [110.0] and does not return any value. It declare 1.0 function, It has 1.0 function...
pasteorg_paste
StackedObjectProxy
public
0
0
__dir__
def __dir__(self):"""Return a list of the StackedObjectProxy's and proxiedobject's (if one exists) names."""dir_list = dir(self.__class__) + list(self.__dict__.keys())try:dir_list.extend(dir(self._current_obj()))except TypeError:passdir_list.sort()return dir_list
2
8
1
51
0
122
132
122
self
[]
Returns
{"Assign": 1, "Expr": 3, "Return": 1, "Try": 1}
7
11
7
["dir", "list", "self.__dict__.keys", "dir_list.extend", "dir", "self._current_obj", "dir_list.sort"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3982512_facebookresearch_pytext.pytext.config.component_py.ComponentMeta.__dir__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.55413314_dbbs_lab_bsb.libs.nrn_patch.patch.objects_py.PythonHocObject.__dir__", "_.con...
The function (__dir__) defined within the public class called StackedObjectProxy.The function start at line 122 and ends at 132. It contains 8 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 7.0 functions, It has 7.0 functio...
pasteorg_paste
StackedObjectProxy
public
0
0
__getattr__
def __getattr__(self, attr):return getattr(self._current_obj(), attr)
1
2
2
18
0
134
135
134
self,attr
[]
Returns
{"Return": 1}
2
2
2
["getattr", "self._current_obj"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3966276_appimagecrafters_appimage_builder.appimagebuilder.recipe.roamer_py.Roamer.__getattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69693687_agnostiqhq_covalent.covalent._workflow.electron_py.Electron.__ge...
The function (__getattr__) defined within the public class called StackedObjectProxy.The function start at line 134 and ends at 135. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [134.0], and this function return a value. It declares 2.0 functions, It has 2.0...
pasteorg_paste
StackedObjectProxy
public
0
0
__setattr__
def __setattr__(self, attr, value):setattr(self._current_obj(), attr, value)
1
2
3
21
0
137
138
137
self,attr,value
[]
None
{"Expr": 1}
2
2
2
["setattr", "self._current_obj"]
28
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.config_py.Config.__setattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.storedobject_py.StoredObject.__setattr__", "_.content.g...
The function (__setattr__) defined within the public class called StackedObjectProxy.The function start at line 137 and ends at 138. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [137.0] and does not return any value. It declares 2.0 functions, It has 2.0 fun...
pasteorg_paste
StackedObjectProxy
public
0
0
__delattr__
def __delattr__(self, name):delattr(self._current_obj(), name)
1
2
2
17
0
140
141
140
self,name
[]
None
{"Expr": 1}
2
2
2
["delattr", "self._current_obj"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.55413314_dbbs_lab_bsb.packages.bsb_core.bsb.options_py._OptionsModule.__delattr__"]
The function (__delattr__) defined within the public class called StackedObjectProxy.The function start at line 140 and ends at 141. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [140.0] and does not return any value. It declares 2.0 functions, It has 2.0 fun...
pasteorg_paste
StackedObjectProxy
public
0
0
__getitem__
def __getitem__(self, key):return self._current_obj()[key]
1
2
2
16
0
143
144
143
self,key
[]
Returns
{"Return": 1}
1
2
1
["self._current_obj"]
28
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.AbstractForeignList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.ForeignList.__g...
The function (__getitem__) defined within the public class called StackedObjectProxy.The function start at line 143 and ends at 144. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [143.0], and this function return a value. It declare 1.0 function, It has 1.0 f...
pasteorg_paste
StackedObjectProxy
public
0
0
__setitem__
def __setitem__(self, key, value):self._current_obj()[key] = value
1
2
3
19
0
146
147
146
self,key,value
[]
None
{"Assign": 1}
1
2
1
["self._current_obj"]
33
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__setitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForeignList.__setitem__", "_.content.gdri...
The function (__setitem__) defined within the public class called StackedObjectProxy.The function start at line 146 and ends at 147. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [146.0] and does not return any value. It declare 1.0 function, It has 1.0 funct...
pasteorg_paste
StackedObjectProxy
public
0
0
__delitem__
def __delitem__(self, key):del self._current_obj()[key]
1
2
2
16
0
149
150
149
self,key
[]
None
{}
1
2
1
["self._current_obj"]
14
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__delitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.utils_py.APIList.__delitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Data...
The function (__delitem__) defined within the public class called StackedObjectProxy.The function start at line 149 and ends at 150. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [149.0] and does not return any value. It declare 1.0 function, It has 1.0 funct...
pasteorg_paste
StackedObjectProxy
public
0
0
__call__
def __call__(self, *args, **kw):return self._current_obj()(*args, **kw)
1
2
3
24
0
152
153
152
self,*args,**kw
[]
Returns
{"Return": 1}
1
2
1
["self._current_obj"]
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 StackedObjectProxy.The function start at line 152 and ends at 153. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [152.0], and this function return a value. It declare 1.0 function, It has 1.0 func...
pasteorg_paste
StackedObjectProxy
public
0
0
__repr__
def __repr__(self):try:return repr(self._current_obj())except (TypeError, AttributeError):return '<%s.%s object at 0x%x>' % (self.__class__.__module__, self.__class__.__name__, id(self))
2
7
1
44
0
155
161
155
self
[]
Returns
{"Return": 2, "Try": 1}
3
7
3
["repr", "self._current_obj", "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 StackedObjectProxy.The function start at line 155 and ends at 161. It contains 7 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functi...
pasteorg_paste
StackedObjectProxy
public
0
0
__iter__
def __iter__(self):return iter(self._current_obj())
1
2
1
14
0
163
164
163
self
[]
Returns
{"Return": 1}
2
2
2
["iter", "self._current_obj"]
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 StackedObjectProxy.The function start at line 163 and ends at 164. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functi...
pasteorg_paste
StackedObjectProxy
public
0
0
__bool__
def __bool__(self):return bool(self._current_obj())
1
2
1
14
0
166
167
166
self
[]
Returns
{"Return": 1}
2
2
2
["bool", "self._current_obj"]
0
[]
The function (__bool__) defined within the public class called StackedObjectProxy.The function start at line 166 and ends at 167. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 f...
pasteorg_paste
StackedObjectProxy
public
0
0
__len__
def __len__(self):return len(self._current_obj())
1
2
1
14
0
169
170
169
self
[]
Returns
{"Return": 1}
2
2
2
["len", "self._current_obj"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3665918_alvinwan_neural_backed_decision_trees.nbdt.data.imagenet_py._TinyImagenet200Val.__len__"]
The function (__len__) defined within the public class called StackedObjectProxy.The function start at line 169 and ends at 170. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functio...
pasteorg_paste
StackedObjectProxy
public
0
0
__contains__
def __contains__(self, key):return key in self._current_obj()
1
2
2
15
0
172
173
172
self,key
[]
Returns
{"Return": 1}
1
2
1
["self._current_obj"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.exdir.core.exdir_file_py.File.__contains__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3692721_yelp_bravado_core.bravado_core.util_py.AliasKeyDict.__contains__", "_.content.gdrive.MyDrive.Ph...
The function (__contains__) defined within the public class called StackedObjectProxy.The function start at line 172 and ends at 173. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [172.0], and this function return a value. It declare 1.0 function, It has 1.0 ...
pasteorg_paste
StackedObjectProxy
public
0
0
__nonzero__
def __nonzero__(self):return bool(self._current_obj())
1
2
1
14
0
175
176
175
self
[]
Returns
{"Return": 1}
2
2
2
["bool", "self._current_obj"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637706_disqus_gutter.tests.test_arguments_py.StringTest.test_nonzero_returns_if_truthy", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3641147_gamechanger_dusty.tests.unit.command_file_test_py.TestCommandFile.test_...
The function (__nonzero__) defined within the public class called StackedObjectProxy.The function start at line 175 and ends at 176. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 fun...
pasteorg_paste
StackedObjectProxy
public
0
0
_current_obj
def _current_obj(self):"""Returns the current active object being proxied toIn the event that no object was pushed, the default object ifprovided will be used. Otherwise, a TypeError will be raised."""try:objects = self.____local__.objectsexcept AttributeError:objects = Noneif objects:return objects[-1]else:obj = self....
4
15
1
64
0
178
198
178
self
[]
Returns
{"Assign": 3, "Expr": 1, "If": 2, "Return": 2, "Try": 1}
2
21
2
["self.__dict__.get", "TypeError"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.config_py.DispatchingConfig._current_obj"]
The function (_current_obj) defined within the public class called StackedObjectProxy.The function start at line 178 and ends at 198. It contains 15 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 f...
pasteorg_paste
StackedObjectProxy
public
0
0
_push_object
def _push_object(self, obj):"""Make ``obj`` the active object for this thread-local.This should be used like:.. code-block:: pythonobj = yourobject()module.glob = StackedObjectProxy()module.glob._push_object(obj)try:... do stuff ...finally:module.glob._pop_object(conf)"""try:self.____local__.objects.append(obj)except A...
2
6
2
41
0
200
220
200
self,obj
[]
None
{"Assign": 1, "Expr": 3, "Try": 1}
2
21
2
["self.____local__.objects.append", "self.____local__.objects.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.wsgiwrappers_py.DeprecatedSettings._push_object"]
The function (_push_object) defined within the public class called StackedObjectProxy.The function start at line 200 and ends at 220. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [200.0] and does not return any value. It declares 2.0 functions, It has 2.0 fu...
pasteorg_paste
StackedObjectProxy
public
0
0
_pop_object
def _pop_object(self, obj=None):"""Remove a thread-local object.If ``obj`` is given, it is checked against the popped object and anerror is emitted if they don't match."""try:popped = self.____local__.objects.pop()if obj and popped is not obj:raise AssertionError('The object popped (%s) is not the same as the object ''...
4
9
2
51
0
222
236
222
self,obj
[]
None
{"Assign": 1, "Expr": 1, "If": 1, "Try": 1}
3
15
3
["self.____local__.objects.pop", "AssertionError", "AssertionError"]
0
[]
The function (_pop_object) defined within the public class called StackedObjectProxy.The function start at line 222 and ends at 236. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [222.0] and does not return any value. It declares 3.0 functions, and It has 3....
pasteorg_paste
StackedObjectProxy
public
0
0
_object_stack
def _object_stack(self):"""Returns all of the objects stacked in this container(Might return [] if there are none)"""try:try:objs = self.____local__.objectsexcept AttributeError:return []return objs[:]except AssertionError:return []
3
9
1
34
0
238
250
238
self
[]
Returns
{"Assign": 1, "Expr": 1, "Return": 3, "Try": 2}
0
13
0
[]
0
[]
The function (_object_stack) defined within the public class called StackedObjectProxy.The function start at line 238 and ends at 250. It contains 9 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value..
pasteorg_paste
StackedObjectProxy
public
0
0
_current_obj_restoration
def _current_obj_restoration(self):request_id = restorer.in_restoration()if request_id:return restorer.get_saved_proxied_obj(self, request_id)return self._current_obj_orig()
2
5
1
30
0
256
260
256
self
[]
Returns
{"Assign": 1, "If": 1, "Return": 2}
3
5
3
["restorer.in_restoration", "restorer.get_saved_proxied_obj", "self._current_obj_orig"]
0
[]
The function (_current_obj_restoration) defined within the public class called StackedObjectProxy.The function start at line 256 and ends at 260. 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 3.0 functions, a...
pasteorg_paste
StackedObjectProxy
public
0
0
_push_object_restoration
def _push_object_restoration(self, obj):if not restorer.in_restoration():self._push_object_orig(obj)
2
3
2
21
0
265
267
265
self,obj
[]
None
{"Expr": 1, "If": 1}
2
3
2
["restorer.in_restoration", "self._push_object_orig"]
0
[]
The function (_push_object_restoration) defined within the public class called StackedObjectProxy.The function start at line 265 and ends at 267. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [265.0] and does not return any value. It declares 2.0 functions, a...
pasteorg_paste
StackedObjectProxy
public
0
0
_pop_object_restoration
def _pop_object_restoration(self, obj=None):if not restorer.in_restoration():self._pop_object_orig(obj)
2
3
2
23
0
272
274
272
self,obj
[]
None
{"Expr": 1, "If": 1}
2
3
2
["restorer.in_restoration", "self._pop_object_orig"]
0
[]
The function (_pop_object_restoration) defined within the public class called StackedObjectProxy.The function start at line 272 and ends at 274. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [272.0] and does not return any value. It declares 2.0 functions, an...
pasteorg_paste
StackedObjectProxy
public
0
0
__init__
def __init__(self):"""Create a new Registry object``prepare`` must still be called before this Registry object can beused to register objects."""self.reglist = []
1
2
1
12
0
294
301
294
self,default,name
[]
None
{"Assign": 3, "Expr": 1, "If": 1}
1
11
1
["threadinglocal.local"]
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 StackedObjectProxy.The function start at line 294 and ends at 301. 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 cal...
pasteorg_paste
Registry
public
0
0
prepare
def prepare(self):"""Used to create a new registry contextAnytime a new RegistryManager is called, ``prepare`` needs to becalled on the existing Registry object. This sets up a new contextfor registering objects."""self.reglist.append({})
1
2
1
15
0
303
311
303
self
[]
None
{"Expr": 2}
1
9
1
["self.reglist.append"]
43
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.contrib.client.test_tornado_py.RESTHandler.prepare", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3659669_pyopenapi_pyswagger.pyswagger.tests.v1_2.test_auth_py.BasicAuthA...
The function (prepare) defined within the public class called Registry.The function start at line 303 and ends at 311. 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 inside ...
pasteorg_paste
Registry
public
0
0
register
def register(self, stacked, obj):"""Register an object with a StackedObjectProxy"""myreglist = self.reglist[-1]stacked_id = id(stacked)if stacked_id in myreglist:stacked._pop_object(myreglist[stacked_id][1])del myreglist[stacked_id]stacked._push_object(obj)myreglist[stacked_id] = (stacked, obj)
2
8
3
63
0
313
321
313
self,stacked,obj
[]
None
{"Assign": 3, "Expr": 3, "If": 1}
3
9
3
["id", "stacked._pop_object", "stacked._push_object"]
168
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.tests.test_progress_py.test_status_fd", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3653223_gsand_mark2.mk2.plugins.irc_py.IRC.setup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creat...
The function (register) defined within the public class called Registry.The function start at line 313 and ends at 321. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [313.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called...
pasteorg_paste
Registry
public
0
0
multiregister
def multiregister(self, stacklist):"""Register a list of tuplesSimilar call semantics as register, except this registersmultiple objects at once.Example::registry.multiregister([(sop, obj), (anothersop, anotherobj)])"""myreglist = self.reglist[-1]for stacked, obj in stacklist:stacked_id = id(stacked)if stacked_id in my...
3
9
2
68
0
323
341
323
self,stacklist
[]
None
{"Assign": 3, "Expr": 3, "For": 1, "If": 1}
3
19
3
["id", "stacked._pop_object", "stacked._push_object"]
0
[]
The function (multiregister) defined within the public class called Registry.The function start at line 323 and ends at 341. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [323.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functi...
pasteorg_paste
Registry
public
0
0
cleanup
def cleanup(self):"""Remove all objects from all StackedObjectProxy instances thatwere tracked at this Registry context"""for stacked, obj in self.reglist[-1].values():stacked._pop_object(obj)self.reglist.pop()
2
4
1
36
0
346
351
346
self
[]
None
{"Expr": 3, "For": 1}
3
6
3
["values", "stacked._pop_object", "self.reglist.pop"]
34
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.comparators.device_py.Device.cleanup", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3537219_anthraxx_diffoscope.diffoscope.comparators.symlink_py.Symlink.cleanup", "_.content....
The function (cleanup) defined within the public class called Registry.The function start at line 346 and ends at 351. 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 declares 3.0 functions, It has 3.0 functions called insi...
pasteorg_paste
StackedObjectProxy
public
0
0
__init__
def __init__(self, application, streaming=False):self.application = applicationself.streaming = streaming
1
3
3
21
0
368
370
368
self,default,name
[]
None
{"Assign": 3, "Expr": 1, "If": 1}
1
11
1
["threadinglocal.local"]
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 StackedObjectProxy.The function start at line 368 and ends at 370. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [368.0] and does not return any value. It declare 1.0 function, It has 1.0 function...
pasteorg_paste
StackedObjectProxy
public
0
0
__call__
def __call__(self, environ, start_response):app_iter = Nonereg = environ.setdefault('paste.registry', Registry())reg.prepare()if self.streaming:return self.streaming_iter(reg, environ, start_response)try:app_iter = self.application(environ, start_response)except Exception as e:# Regardless of if the content is an itera...
9
26
3
145
0
372
406
372
self,*args,**kw
[]
Returns
{"Return": 1}
1
2
1
["self._current_obj"]
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 StackedObjectProxy.The function start at line 372 and ends at 406. It contains 26 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [372.0], and this function return a value. It declare 1.0 function, It has 1.0 fun...
pasteorg_paste
RegistryManager
public
0
0
streaming_iter
def streaming_iter(self, reg, environ, start_response):try:for item in self.application(environ, start_response):yield itemexcept Exception as e:# Regardless of if the content is an iterable, generator, list# or tuple, we clean-up right now. If its an iterable/generator# care should be used to ensure the generator has ...
9
21
4
113
0
408
435
408
self,reg,environ,start_response
[]
None
{"Assign": 2, "Expr": 6, "For": 2, "If": 4, "Try": 1}
10
28
10
["self.application", "environ.get", "environ.get", "isinstance", "restorer.save_registry_state", "reg.cleanup", "environ.get", "restorer.save_registry_state", "reg.cleanup", "reg.cleanup"]
0
[]
The function (streaming_iter) defined within the public class called RegistryManager.The function start at line 408 and ends at 435. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 4 parameters, represented as [408.0] and does not return any value. It declares 10.0 functions, and It has ...
pasteorg_paste
StackedObjectProxy
public
0
0
__init__
def __init__(self):# Registries and their saved reglists by request_idself.saved_registry_states = {}self.restoration_context_id = threadinglocal.local()
1
3
1
20
0
479
482
479
self,default,name
[]
None
{"Assign": 3, "Expr": 1, "If": 1}
1
11
1
["threadinglocal.local"]
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 StackedObjectProxy.The function start at line 479 and ends at 482. It contains 3 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 cal...
pasteorg_paste
StackedObjectRestorer
public
0
0
save_registry_state
def save_registry_state(self, environ):"""Save the state of this request's Registry (if it hasn't already beensaved) to the saved_registry_states dict, keyed by the request's uniqueidentifier"""registry = environ.get('paste.registry')if not registry or not len(registry.reglist) or \self.get_request_id(environ) in self....
6
10
2
88
0
484
503
484
self,environ
[]
None
{"Assign": 2, "Expr": 2, "For": 2, "If": 1, "Return": 1}
6
20
6
["environ.get", "len", "self.get_request_id", "self.get_request_id", "reglist.values", "self.enable_restoration"]
0
[]
The function (save_registry_state) defined within the public class called StackedObjectRestorer.The function start at line 484 and ends at 503. It contains 10 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [484.0] and does not return any value. It declares 6.0 functions, an...
pasteorg_paste
StackedObjectRestorer
public
0
0
get_saved_proxied_obj
def get_saved_proxied_obj(self, stacked, request_id):"""Retrieve the saved object proxied by the specifiedStackedObjectProxy for the request identified by request_id"""# All state for the request identified by request_idreglist = self.saved_registry_states[request_id][1]# The top of the stack was current when the excep...
4
12
3
72
0
505
526
505
self,stacked,request_id
[]
Returns
{"Assign": 4, "AugAssign": 1, "Expr": 1, "If": 2, "Return": 2, "While": 1}
3
22
3
["len", "id", "stacked._current_obj_orig"]
0
[]
The function (get_saved_proxied_obj) defined within the public class called StackedObjectRestorer.The function start at line 505 and ends at 526. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [505.0], and this function return a value. It declares 3.0 functio...
pasteorg_paste
StackedObjectRestorer
public
0
0
enable_restoration
def enable_restoration(self, stacked):"""Replace the specified StackedObjectProxy's methods with theirrespective restoration versions._current_obj_restoration forces recovery of the saved proxied objectwhen a restoration context is active in the current thread._push/pop_object_restoration avoid pushing/popping data(pus...
3
8
2
63
0
528
546
528
self,stacked
[]
None
{"Assign": 4, "Expr": 1, "For": 1, "If": 1, "Return": 1}
2
19
2
["getattr", "getattr"]
0
[]
The function (enable_restoration) defined within the public class called StackedObjectRestorer.The function start at line 528 and ends at 546. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [528.0] and does not return any value. It declares 2.0 functions, and ...
pasteorg_paste
StackedObjectRestorer
public
0
0
get_request_id
def get_request_id(self, environ):"""Return a unique identifier for the current request"""from paste.evalexception.middleware import get_debug_countreturn get_debug_count(environ)
1
3
2
21
0
548
551
548
self,environ
[]
Returns
{"Expr": 1, "Return": 1}
1
4
1
["get_debug_count"]
0
[]
The function (get_request_id) defined within the public class called StackedObjectRestorer.The function start at line 548 and ends at 551. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [548.0], and this function return a value. It declare 1.0 function, and I...
pasteorg_paste
StackedObjectRestorer
public
0
0
restoration_begin
def restoration_begin(self, request_id):"""Enable a restoration context in the current thread for the specifiedrequest_id"""if request_id in self.saved_registry_states:# Restore the old Registry object's stateregistry, reglist = self.saved_registry_states[request_id]registry.reglist = reglistself.restoration_context_id...
2
5
2
37
0
553
561
553
self,request_id
[]
None
{"Assign": 3, "Expr": 1, "If": 1}
0
9
0
[]
0
[]
The function (restoration_begin) defined within the public class called StackedObjectRestorer.The function start at line 553 and ends at 561. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [553.0] and does not return any value..
pasteorg_paste
StackedObjectRestorer
public
0
0
restoration_end
def restoration_end(self):"""Register a restoration context as finished, if one exists"""try:del self.restoration_context_id.request_idexcept AttributeError:pass
2
5
1
18
0
563
568
563
self
[]
None
{"Expr": 1, "Try": 1}
0
6
0
[]
0
[]
The function (restoration_end) defined within the public class called StackedObjectRestorer.The function start at line 563 and ends at 568. It contains 5 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value..
pasteorg_paste
StackedObjectRestorer
public
0
0
in_restoration
def in_restoration(self):"""Determine if a restoration context is active for the current thread.Returns the request_id it's active for if so, otherwise False"""return getattr(self.restoration_context_id, 'request_id', False)
1
2
1
17
0
570
573
570
self
[]
Returns
{"Expr": 1, "Return": 1}
1
4
1
["getattr"]
0
[]
The function (in_restoration) defined within the public class called StackedObjectRestorer.The function start at line 570 and ends at 573. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, and It ha...
pasteorg_paste
public
public
0
0
make_registry_manager
def make_registry_manager(app, global_conf):return RegistryManager(app)
1
2
2
12
0
579
580
579
app,global_conf
[]
Returns
{"Return": 1}
1
2
1
["RegistryManager"]
0
[]
The function (make_registry_manager) defined within the public class called public.The function start at line 579 and ends at 580. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [579.0], and this function return a value. It declare 1.0 function, and It has 1....
pasteorg_paste
public
public
0
0
install
def install(poll_interval=1):"""Install the reloading monitor.On some platforms server threads may not terminate when the mainthread does, causing ports to remain open/locked.The``raise_keyboard_interrupt`` option creates a unignorable signalwhich causes the whole application to shut-down (rudely)."""mon = Monitor(poll...
1
5
1
38
2
50
62
50
poll_interval
['t', 'mon']
None
{"Assign": 3, "Expr": 2}
3
13
3
["Monitor", "threading.Thread", "t.start"]
25
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.src.scout_apm.falcon_py.ScoutMiddleware.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3703461_scoutapp_scout_apm_python.tests.unit.test_core_py.test_install_fail_monitor_...
The function (install) defined within the public class called public.The function start at line 50 and ends at 62. It contains 5 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 declares 3.0 functions, It has 3.0 functions called inside w...
pasteorg_paste
Monitor
public
0
0
__init__
def __init__(self, poll_interval):self.module_mtimes = {}self.keep_running = Trueself.poll_interval = poll_intervalself.extra_files = list(self.global_extra_files)self.instances.append(self)self.file_callbacks = list(self.global_file_callbacks)
1
7
2
51
0
70
76
70
self,poll_interval
[]
None
{"Assign": 5, "Expr": 1}
3
7
3
["list", "self.instances.append", "list"]
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 Monitor.The function start at line 70 and ends at 76. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [70.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called ins...
pasteorg_paste
Monitor
public
0
0
periodic_reload
def periodic_reload(self):while True:if not self.check_reload():# use os._exit() here and not sys.exit() since within a# thread sys.exit() just closes the given thread and# won't kill the process; note os._exit does not call# any atexit callbacks, nor does it do finally blocks,# flush open files, etc.In otherwords, it ...
3
6
1
31
0
78
88
78
self
[]
None
{"Expr": 2, "If": 1, "While": 1}
3
11
3
["self.check_reload", "os._exit", "time.sleep"]
0
[]
The function (periodic_reload) defined within the public class called Monitor.The function start at line 78 and ends at 88. 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 declares 3.0 functions, and It has 3.0 functions c...
pasteorg_paste
Monitor
public
0
0
check_reload
def check_reload(self):filenames = list(self.extra_files)for file_callback in self.file_callbacks:try:filenames.extend(file_callback())except Exception:print("Error calling paste.reloader callback %r:" % file_callback,file=sys.stderr)traceback.print_exc()for module in sys.modules.values():try:filename = module.__file__...
15
36
1
255
0
90
125
90
self
[]
Returns
{"Assign": 8, "Expr": 5, "For": 3, "If": 6, "Return": 2, "Try": 3}
17
36
17
["list", "filenames.extend", "file_callback", "print", "traceback.print_exc", "sys.modules.values", "filenames.append", "os.stat", "filename.endswith", "os.path.exists", "max", "os.stat", "filename.endswith", "os.path.exists", "max", "os.stat", "print"]
0
[]
The function (check_reload) defined within the public class called Monitor.The function start at line 90 and ends at 125. It contains 36 lines of code and it has a cyclomatic complexity of 15. The function does not take any parameters, and this function return a value. It declares 17.0 functions, and It has 17.0 funct...
pasteorg_paste
Monitor
public
0
0
watch_file
def watch_file(self, cls, filename):"""Watch the named file for changes"""filename = os.path.abspath(filename)if self is None:for instance in cls.instances:instance.watch_file(filename)cls.global_extra_files.append(filename)else:self.extra_files.append(filename)
3
8
3
56
0
127
135
127
self,cls,filename
[]
None
{"Assign": 1, "Expr": 4, "For": 1, "If": 1}
4
9
4
["os.path.abspath", "instance.watch_file", "cls.global_extra_files.append", "self.extra_files.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720376_ckan_ckanext_scheming.ckanext.scheming.plugins_py._load_schema_module_path"]
The function (watch_file) defined within the public class called Monitor.The function start at line 127 and ends at 135. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [127.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions calle...
pasteorg_paste
Monitor
public
0
0
add_file_callback
def add_file_callback(self, cls, callback):"""Add a callback -- a function that takes no parameters -- that willreturn a list of filenames to watch for changes."""if self is None:for instance in cls.instances:instance.add_file_callback(callback)cls.global_file_callbacks.append(callback)else:self.file_callbacks.append(c...
3
7
3
46
0
139
147
139
self,cls,callback
[]
None
{"Expr": 4, "For": 1, "If": 1}
3
9
3
["instance.add_file_callback", "cls.global_file_callbacks.append", "self.file_callbacks.append"]
0
[]
The function (add_file_callback) defined within the public class called Monitor.The function start at line 139 and ends at 147. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [139.0] and does not return any value. It declares 3.0 functions, and It has 3.0 fun...
pasteorg_paste
Monitor
public
0
0
periodic_reload
def periodic_reload(self):while True:if not self.check_reload():raise SystemRestart()time.sleep(self.poll_interval)
3
5
1
28
0
171
175
171
self
[]
None
{"Expr": 2, "If": 1, "While": 1}
3
11
3
["self.check_reload", "os._exit", "time.sleep"]
0
[]
The function (periodic_reload) defined within the public class called Monitor.The function start at line 171 and ends at 175. It contains 5 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 3.0 functions, and It has 3.0 functions...
pasteorg_paste
public
public
0
0
get_cookies
def get_cookies(environ):"""Gets a cookie object (which is a dictionary-like object) from therequest environment; caches this value in case get_cookies iscalled again for the same request."""header = environ.get('HTTP_COOKIE', '')if 'paste.cookies' in environ:cookies, check_header = environ['paste.cookies']if check_hea...
4
13
1
65
2
32
50
32
environ
['header', 'cookies']
Returns
{"Assign": 4, "Expr": 2, "If": 2, "Return": 2, "Try": 1}
3
19
3
["environ.get", "SimpleCookie", "cookies.load"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.cookie_py.AuthCookieHandler.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95159979_LifeActor_ykdl.ykdl.extractors._byted_py.get_cookies_d"]
The function (get_cookies) defined within the public class called public.The function start at line 32 and ends at 50. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions called...
pasteorg_paste
public
public
0
0
get_cookie_dict
def get_cookie_dict(environ):"""Return a *plain* dictionary of cookies as found in the request.Unlike ``get_cookies`` this returns a dictionary, not a``SimpleCookie`` object.For incoming cookies a dictionary fullyrepresents the information.Like ``get_cookies`` this caches andchecks the cache."""header = environ.get('HT...
6
18
1
90
3
52
76
52
environ
['header', 'result', 'cookies']
Returns
{"Assign": 6, "Expr": 2, "For": 1, "If": 3, "Return": 3, "Try": 1}
3
25
3
["environ.get", "SimpleCookie", "cookies.load"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.wsgiwrappers_py.WSGIRequest.cookies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_request_py.test_bad_cookie"]
The function (get_cookie_dict) defined within the public class called public.The function start at line 52 and ends at 76. It contains 18 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions ca...
pasteorg_paste
public
public
0
0
parse_querystring
def parse_querystring(environ):"""Parses a query string into a list like ``[(name, value)]``.Caches this value in case parse_querystring is called againfor the same request.You can pass the result to ``dict()``, but be aware that keys thatappear multiple times will be lost (only the last value will bepreserved)."""sour...
4
12
1
69
2
78
99
78
environ
['source', 'parsed']
Returns
{"Assign": 4, "Expr": 1, "If": 3, "Return": 3}
2
22
2
["environ.get", "parse_qsl"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.request_py.parse_formvars", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_request_form_py.test_parse_querystring"]
The function (parse_querystring) defined within the public class called public.The function start at line 78 and ends at 99. It contains 12 lines of code and it has a cyclomatic complexity of 4. 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
public
public
0
0
parse_dict_querystring
def parse_dict_querystring(environ):"""Parses a query string like parse_querystring, but returns a MultiDictCaches this value in case parse_dict_querystring is called againfor the same request.Example::>>> environ = {'QUERY_STRING': 'day=Monday&user=fred&user=jane'}>>> parsed = parse_dict_querystring(environ)>>> parsed...
4
13
1
76
3
101
131
101
environ
['source', 'multi', 'parsed']
Returns
{"Assign": 5, "Expr": 1, "If": 3, "Return": 3}
4
31
4
["environ.get", "MultiDict", "parse_qsl", "MultiDict"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.wsgiwrappers_py.WSGIRequest._GET"]
The function (parse_dict_querystring) defined within the public class called public.The function start at line 101 and ends at 131. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 4.0 functions, It has 4.0 fun...
pasteorg_paste
public
public
0
0
parse_formvars
def parse_formvars(environ, include_get_vars=True, encoding=None, errors=None):"""Parses the request, returning a MultiDict of form variables.If ``include_get_vars`` is true then GET (query string) variableswill also be folded into the MultiDict.All values should be strings, except for file uploads which areleft as ``F...
13
38
4
256
10
133
187
133
environ,include_get_vars,encoding,errors
['ct', 'fs', 'values', 'value', 'source', 'old_query_string', 'use_cgi', 'formvars', 'kwparms', 'inp']
Returns
{"Assign": 18, "Expr": 3, "For": 2, "If": 10, "Return": 2}
13
55
13
["MultiDict", "lower", "partition", "environ.get", "environ.get", "environ.get", "FieldStorage", "isinstance", "fs.keys", "isinstance", "formvars.add", "formvars.update", "parse_querystring"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.auth.form_py.AuthFormHandler.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.watchthreads_py.WatchThreads.kill", "_.content.gdrive.MyDrive.P...
The function (parse_formvars) defined within the public class called public.The function start at line 133 and ends at 187. It contains 38 lines of code and it has a cyclomatic complexity of 13. It takes 4 parameters, represented as [133.0], and this function return a value. It declares 13.0 functions, It has 13.0 func...
pasteorg_paste
public
public
0
0
construct_url
def construct_url(environ, with_query_string=True, with_path_info=True,script_name=None, path_info=None, querystring=None):"""Reconstructs the URL from the WSGI environment.You may override SCRIPT_NAME, PATH_INFO, and QUERYSTRING withthe keyword arguments."""url = environ['wsgi.url_scheme']+'://'if environ.get('HTTP_HO...
18
41
6
250
3
189
237
189
environ,with_query_string,with_path_info,script_name,path_info,querystring
['url', 'port', 'host']
Returns
{"Assign": 6, "AugAssign": 11, "Expr": 1, "If": 17, "Return": 1}
9
49
9
["environ.get", "host.split", "quote", "environ.get", "quote", "quote", "environ.get", "quote", "environ.get"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87033950_inter_actief_amelie.amelie.tools.ariana_py.ArianaHandler.emit", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.87033950_inter_actief_amelie.amelie.tools.ariana_py.send_irc", "_.content.gdrive.MyDrive.Phd_The...
The function (construct_url) defined within the public class called public.The function start at line 189 and ends at 237. It contains 41 lines of code and it has a cyclomatic complexity of 18. It takes 6 parameters, represented as [189.0], and this function return a value. It declares 9.0 functions, It has 9.0 functio...
pasteorg_paste
public
public
0
0
resolve_relative_url
def resolve_relative_url(url, environ):"""Resolve the given relative URL as being relative to thelocation represented by the environment.This can be usedfor redirecting to a relative path.Note: if url is alreadyabsolute, this function will (intentionally) have no effecton it."""cur_url = construct_url(environ, with_que...
1
3
2
27
1
239
249
239
url,environ
['cur_url']
Returns
{"Assign": 1, "Expr": 1, "Return": 1}
2
11
2
["construct_url", "urlparse.urljoin"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.httpexceptions_py._HTTPMove.relative_redirect"]
The function (resolve_relative_url) defined within the public class called public.The function start at line 239 and ends at 249. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [239.0], and this function return a value. It declares 2.0 functions, It has 2.0 fu...
pasteorg_paste
public
public
0
0
path_info_split
def path_info_split(path_info):"""Splits off the first segment of the path.Returns (first_part,rest_of_path).first_part can be None (if PATH_INFO is empty), ''(if PATH_INFO is '/'), or a name without any /'s.rest_of_pathcan be '' or a string starting with /."""if not path_info:return None, ''assert path_info.startswith...
3
11
1
64
1
251
268
251
path_info
['path_info']
Returns
{"Assign": 2, "Expr": 1, "If": 2, "Return": 3}
3
18
3
["path_info.startswith", "path_info.lstrip", "path_info.split"]
0
[]
The function (path_info_split) defined within the public class called public.The function start at line 251 and ends at 268. It contains 11 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 funct...
pasteorg_paste
public
public
0
0
path_info_pop
def path_info_pop(environ):"""'Pops' off the next segment of PATH_INFO, pushing it ontoSCRIPT_NAME, and returning that segment.For instance::>>> def call_it(script_name, path_info):... env = {'SCRIPT_NAME': script_name, 'PATH_INFO': path_info}... result = path_info_pop(env)... print('SCRIPT_NAME=%r; PATH_INFO=%r; retur...
4
16
1
93
1
270
308
270
environ
['path']
Returns
{"Assign": 5, "AugAssign": 3, "Expr": 1, "If": 2, "Return": 3, "While": 1}
3
39
3
["environ.get", "path.startswith", "path.split"]
0
[]
The function (path_info_pop) defined within the public class called public.The function start at line 270 and ends at 308. It contains 16 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 3.0 functions, and It has 3.0 functio...
pasteorg_paste
public
public
0
0
parse_headers
def parse_headers(environ):"""Parse the headers in the environment (like ``HTTP_HOST``) andyield a sequence of those (header_name, value) tuples."""# @@: Maybe should parse out comma-separated headers?for cgi_var, value in environ.iteritems():if cgi_var in _parse_headers_special:yield _parse_headers_special[cgi_var], v...
4
6
1
56
0
317
327
317
environ
[]
None
{"Expr": 3, "For": 1, "If": 2}
4
11
4
["environ.iteritems", "cgi_var.startswith", "replace", "title"]
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 317 and ends at 327. It contains 6 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 4.0 functions, It has 4.0 functions called ...
pasteorg_paste
EnvironHeaders
public
0
1
__init__
def __init__(self, environ):self.environ = environ
1
2
2
12
0
340
341
340
self,environ
[]
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 EnvironHeaders, that inherit another class.The function start at line 340 and ends at 341. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [340.0] and does not return any value. It has 6814.0 functi...
pasteorg_paste
EnvironHeaders
public
0
1
_trans_name
def _trans_name(self, name):key = 'HTTP_'+name.replace('-', '_').upper()if key == 'HTTP_CONTENT_LENGTH':key = 'CONTENT_LENGTH'elif key == 'HTTP_CONTENT_TYPE':key = 'CONTENT_TYPE'return key
3
7
2
41
0
343
349
343
self,name
[]
Returns
{"Assign": 3, "If": 2, "Return": 1}
2
7
2
["upper", "name.replace"]
0
[]
The function (_trans_name) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 343 and ends at 349. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [343.0], and this function return a value. It declares 2...
pasteorg_paste
EnvironHeaders
public
0
1
_trans_key
def _trans_key(self, key):if key == 'CONTENT_TYPE':return 'Content-Type'elif key == 'CONTENT_LENGTH':return 'Content-Length'elif key.startswith('HTTP_'):return key[5:].replace('_', '-').title()else:return None
4
9
2
50
0
351
359
351
self,key
[]
Returns
{"If": 3, "Return": 4}
3
9
3
["key.startswith", "title", "replace"]
0
[]
The function (_trans_key) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 351 and ends at 359. It contains 9 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [351.0], and this function return a value. It declares 3....
pasteorg_paste
EnvironHeaders
public
0
1
__len__
def __len__(self):return len(self.environ)
1
2
1
12
0
361
362
361
self
[]
Returns
{"Return": 1}
1
2
1
["len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3665918_alvinwan_neural_backed_decision_trees.nbdt.data.imagenet_py._TinyImagenet200Val.__len__"]
The function (__len__) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 361 and ends at 362. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 functi...
pasteorg_paste
EnvironHeaders
public
0
1
__getitem__
def __getitem__(self, item):return self.environ[self._trans_name(item)]
1
2
2
19
0
364
365
364
self,item
[]
Returns
{"Return": 1}
1
2
1
["self._trans_name"]
28
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.AbstractForeignList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.ForeignList.__g...
The function (__getitem__) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 364 and ends at 365. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [364.0], and this function return a value. It declare 1....
pasteorg_paste
EnvironHeaders
public
0
1
__setitem__
def __setitem__(self, item, value):# @@: Should this dictionary be writable at all?self.environ[self._trans_name(item)] = value
1
2
3
22
0
367
369
367
self,item,value
[]
None
{"Assign": 1}
1
3
1
["self._trans_name"]
33
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__setitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForeignList.__setitem__", "_.content.gdri...
The function (__setitem__) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 367 and ends at 369. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [367.0] and does not return any value. It declare 1.0 fu...
pasteorg_paste
EnvironHeaders
public
0
1
__delitem__
def __delitem__(self, item):del self.environ[self._trans_name(item)]
1
2
2
19
0
371
372
371
self,item
[]
None
{}
1
2
1
["self._trans_name"]
14
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__delitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.utils_py.APIList.__delitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Data...
The function (__delitem__) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 371 and ends at 372. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [371.0] and does not return any value. It declare 1.0 fu...
pasteorg_paste
EnvironHeaders
public
0
1
__iter__
def __iter__(self):for key in self.environ:name = self._trans_key(key)if name is not None:yield name
3
5
1
28
0
374
378
374
self
[]
None
{"Assign": 1, "Expr": 1, "For": 1, "If": 1}
1
5
1
["self._trans_key"]
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 EnvironHeaders, that inherit another class.The function start at line 374 and ends at 378. It contains 5 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,...
pasteorg_paste
EnvironHeaders
public
0
1
keys
def keys(self):return list(iter(self))
1
2
1
13
0
380
381
380
self
[]
Returns
{"Return": 1}
2
2
2
["list", "iter"]
420
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.19906768_dragon_userbot_dragon_userbot.modules.filters_py.contains_filter", "_.conte...
The function (keys) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 380 and ends at 381. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 function...
pasteorg_paste
EnvironHeaders
public
0
1
__contains__
def __contains__(self, item):return self._trans_name(item) in self.environ
1
2
2
18
0
383
384
383
self,item
[]
Returns
{"Return": 1}
1
2
1
["self._trans_name"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.exdir.core.exdir_file_py.File.__contains__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3692721_yelp_bravado_core.bravado_core.util_py.AliasKeyDict.__contains__", "_.content.gdrive.MyDrive.Ph...
The function (__contains__) defined within the public class called EnvironHeaders, that inherit another class.The function start at line 383 and ends at 384. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [383.0], and this function return a value. It declare 1...
pasteorg_paste
HeaderDict
public
0
1
__getitem__
def __getitem__(self, key):return dict.__getitem__(self, self.normalize(key))
1
2
2
21
0
29
30
29
self,key
[]
Returns
{"Return": 1}
2
2
2
["dict.__getitem__", "self.normalize"]
28
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.AbstractForeignList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.ForeignList.__g...
The function (__getitem__) defined within the public class called HeaderDict, that inherit another class.The function start at line 29 and ends at 30. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0], and this function return a value. It declares 2.0 func...
pasteorg_paste
HeaderDict
public
0
1
__setitem__
def __setitem__(self, key, value):dict.__setitem__(self, self.normalize(key), value)
1
2
3
24
0
32
33
32
self,key,value
[]
None
{"Expr": 1}
2
2
2
["dict.__setitem__", "self.normalize"]
33
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__setitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3621460_cos_archives_modular_odm.modularodm.fields.lists_py.BaseForeignList.__setitem__", "_.content.gdri...
The function (__setitem__) defined within the public class called HeaderDict, that inherit another class.The function start at line 32 and ends at 33. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [32.0] and does not return any value. It declares 2.0 function...
pasteorg_paste
HeaderDict
public
0
1
__delitem__
def __delitem__(self, key):dict.__delitem__(self, self.normalize(key))
1
2
2
20
0
35
36
35
self,key
[]
None
{"Expr": 1}
2
2
2
["dict.__delitem__", "self.normalize"]
14
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.mm.utils_py.APIDict.__delitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3609375_dyninc_dyn_python.dyn.tm.utils_py.APIList.__delitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Data...
The function (__delitem__) defined within the public class called HeaderDict, that inherit another class.The function start at line 35 and ends at 36. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [35.0] and does not return any value. It declares 2.0 function...
pasteorg_paste
HeaderDict
public
0
1
__contains__
def __contains__(self, key):return dict.__contains__(self, self.normalize(key))
1
2
2
21
0
38
39
38
self,key
[]
Returns
{"Return": 1}
2
2
2
["dict.__contains__", "self.normalize"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3627162_cinpla_exdir.exdir.core.exdir_file_py.File.__contains__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3692721_yelp_bravado_core.bravado_core.util_py.AliasKeyDict.__contains__", "_.content.gdrive.MyDrive.Ph...
The function (__contains__) defined within the public class called HeaderDict, that inherit another class.The function start at line 38 and ends at 39. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [38.0], and this function return a value. It declares 2.0 fun...
pasteorg_paste
HeaderDict
public
0
1
get
def get(self, key, failobj=None):return dict.get(self, self.normalize(key), failobj)
1
2
3
27
0
43
44
43
self,key,failobj
[]
Returns
{"Return": 1}
2
2
2
["dict.get", "self.normalize"]
2,985
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Meson.dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.15217004_shayypy_guilded_py.guilded.abc_py.User.__init__", "_.content.gdrive.MyDrive.Phd...
The function (get) defined within the public class called HeaderDict, that inherit another class.The function start at line 43 and ends at 44. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [43.0], and this function return a value. It declares 2.0 functions, I...
pasteorg_paste
HeaderDict
public
0
1
setdefault
def setdefault(self, key, failobj=None):return dict.setdefault(self, self.normalize(key), failobj)
1
2
3
27
0
46
47
46
self,key,failobj
[]
Returns
{"Return": 1}
2
2
2
["dict.setdefault", "self.normalize"]
53
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3546011_hashdist_hashdist.hashdist.deps.argparse_py._SubParsersAction.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3564431_devstructure_blueprint.blueprint.__init___py.Blueprint.add_service", "_.content....
The function (setdefault) defined within the public class called HeaderDict, that inherit another class.The function start at line 46 and ends at 47. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [46.0], and this function return a value. It declares 2.0 funct...
pasteorg_paste
HeaderDict
public
0
1
pop
def pop(self, key, *args):return dict.pop(self, self.normalize(key), *args)
1
2
3
27
0
49
50
49
self,key,*args
[]
Returns
{"Return": 1}
2
2
2
["dict.pop", "self.normalize"]
221
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_schemas_list_py.ListFieldTest.test_can_be_defined_with_a_field_type", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.tests.test_sch...
The function (pop) defined within the public class called HeaderDict, that inherit another class.The function start at line 49 and ends at 50. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [49.0], and this function return a value. It declares 2.0 functions, I...
pasteorg_paste
HeaderDict
public
0
1
update
def update(self, other):for key in other:self[self.normalize(key)] = other[key]
2
3
2
26
0
52
54
52
self,other
[]
None
{"Assign": 1, "For": 1}
1
3
1
["self.normalize"]
403
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.duckhunt_py.ducks", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3508200_spiral_project_daybed.daybed.backends.memory.__init___py.MemoryBackend.put_record", "_.content.gdrive...
The function (update) defined within the public class called HeaderDict, that inherit another class.The function start at line 52 and ends at 54. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [52.0] and does not return any value. It declare 1.0 function, It h...
pasteorg_paste
HeaderDict
public
0
1
normalize
def normalize(self, key):return str(key).lower().strip()
1
2
2
20
0
56
57
56
self,key
[]
Returns
{"Return": 1}
3
2
3
["strip", "lower", "str"]
23
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.blog_py.slugify", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567810_openfisca_openfisca_web_api.openfisca_web_api.controllers.formula_py.api1_formula", "_.content.gdrive.MyDrive.Phd...
The function (normalize) defined within the public class called HeaderDict, that inherit another class.The function start at line 56 and ends at 57. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [56.0], and this function return a value. It declares 3.0 functi...
pasteorg_paste
HeaderDict
public
0
1
add
def add(self, key, value):key = self.normalize(key)if key in self:if isinstance(self[key], list):self[key].append(value)else:self[key] = [self[key], value]else:self[key] = value
3
9
3
65
0
59
67
59
self,key,value
[]
None
{"Assign": 3, "Expr": 1, "If": 2}
3
9
3
["self.normalize", "isinstance", "append"]
358
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.test_1_client", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3470342_bitprophet_ssh.tests.test_client_py.SSHClientTest.test_2_client_dsa", "_.content.gdrive...
The function (add) defined within the public class called HeaderDict, that inherit another class.The function start at line 59 and ends at 67. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [59.0] and does not return any value. It declares 3.0 functions, It ha...
pasteorg_paste
HeaderDict
public
0
1
headeritems
def headeritems(self):result = []for key, value in self.items():if isinstance(value, list):for v in value:result.append((key, str(v)))else:result.append((key, str(value)))return result
4
9
1
63
0
69
77
69
self
[]
Returns
{"Assign": 1, "Expr": 2, "For": 2, "If": 1, "Return": 1}
6
9
6
["self.items", "isinstance", "result.append", "str", "result.append", "str"]
0
[]
The function (headeritems) defined within the public class called HeaderDict, that inherit another class.The function start at line 69 and ends at 77. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters, and this function return a value. It declares 6.0 functio...
pasteorg_paste
HeaderDict
public
0
1
fromlist
def fromlist(cls, seq):self = cls()for name, value in seq:self.add(name, value)return self
2
5
2
29
0
80
84
80
cls,seq
[]
Returns
{"Assign": 1, "Expr": 1, "For": 1, "Return": 1}
2
5
2
["cls", "self.add"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.fixture_py.TestResponse.__init__"]
The function (fromlist) defined within the public class called HeaderDict, that inherit another class.The function start at line 80 and ends at 84. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [80.0], and this function return a value. It declares 2.0 functio...
pasteorg_paste
public
public
0
0
has_header
def has_header(headers, name):"""Is header named ``name`` present in headers?"""name = name.lower()for header, value in headers:if header.lower() == name:return Truereturn False
3
6
2
35
1
88
96
88
headers,name
['name']
Returns
{"Assign": 1, "Expr": 1, "For": 1, "If": 1, "Return": 2}
2
9
2
["name.lower", "header.lower"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94636089_recurve_methods_flexvalue.flexvalue.db_py.DBManager._csv_file_to_dicts", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94636089_recurve_methods_flexvalue.flexvalue.db_py.DBManager._csv_file_to_rows", "_.con...
The function (has_header) defined within the public class called public.The function start at line 88 and ends at 96. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [88.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions calle...
pasteorg_paste
public
public
0
0
header_value
def header_value(headers, name):"""Returns the header's value, or None if no such header.If aheader appears more than once, all the values of the headersare joined with ','. Note that this is consistent /w RFC 2616section 4.2 which states:It MUST be possible to combine the multiple header fieldsinto one "field-name: fi...
4
8
2
48
2
98
120
98
headers,name
['result', 'name']
Returns
{"Assign": 2, "Expr": 1, "If": 1, "Return": 2}
3
23
3
["name.lower", "header.lower", "join"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.cowbell.__init___py.MoreCowbell.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.debug.wdg_validate_py.WDGValidateMiddleware.__call__", "_.content....
The function (header_value) defined within the public class called public.The function start at line 98 and ends at 120. It contains 8 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [98.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions ca...