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
Template
public
0
0
_interpret_codes
def _interpret_codes(self, codes, ns, out):__traceback_hide__ = Truefor item in codes:if isinstance(item, str):out.append(item)else:self._interpret_code(item, ns, out)
3
7
4
45
0
134
140
134
self,codes,ns,out
[]
None
{"Assign": 1, "Expr": 2, "For": 1, "If": 1}
3
7
3
["isinstance", "out.append", "self._interpret_code"]
0
[]
The function (_interpret_codes) defined within the public class called Template.The function start at line 134 and ends at 140. It contains 7 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [134.0] and does not return any value. It declares 3.0 functions, and It has 3.0 fun...
pasteorg_paste
Template
public
0
0
_interpret_code
def _interpret_code(self, code, ns, out):__traceback_hide__ = Truename, pos = code[0], code[1]if name == 'py':self._exec(code[2], ns, pos)elif name == 'continue':raise _TemplateContinue()elif name == 'break':raise _TemplateBreak()elif name == 'for':vars, expr, content = code[2], code[3], code[4]expr = self._eval(expr, ...
11
32
4
263
0
142
173
142
self,code,ns,out
[]
None
{"Assign": 12, "Expr": 4, "For": 1, "If": 9, "Return": 1}
13
32
13
["self._exec", "_TemplateContinue", "_TemplateBreak", "self._eval", "self._interpret_for", "self._interpret_if", "split", "self._eval", "self._eval", "func", "out.append", "self._repr", "self._eval"]
0
[]
The function (_interpret_code) defined within the public class called Template.The function start at line 142 and ends at 173. It contains 32 lines of code and it has a cyclomatic complexity of 11. It takes 4 parameters, represented as [142.0] and does not return any value. It declares 13.0 functions, and It has 13.0 ...
pasteorg_paste
Template
public
0
0
_interpret_for
def _interpret_for(self, vars, expr, content, ns, out):__traceback_hide__ = Truefor item in expr:if len(vars) == 1:ns[vars[0]] = itemelse:if len(vars) != len(item):raise ValueError('Need %i items to unpack (got %i items)'% (len(vars), len(item)))for name, value in zip(vars, item):ns[name] = valuetry:self._interpret_cod...
7
18
6
108
0
175
192
175
self,vars,expr,content,ns,out
[]
None
{"Assign": 3, "Expr": 1, "For": 2, "If": 2, "Try": 1}
8
18
8
["len", "len", "len", "ValueError", "len", "len", "zip", "self._interpret_codes"]
0
[]
The function (_interpret_for) defined within the public class called Template.The function start at line 175 and ends at 192. It contains 18 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [175.0] and does not return any value. It declares 8.0 functions, and It has 8.0 func...
pasteorg_paste
Template
public
0
0
_interpret_if
def _interpret_if(self, parts, ns, out):__traceback_hide__ = True# @@: if/else/else gets throughfor part in parts:assert not isinstance(part, str)name, pos = part[0], part[1]if name == 'else':result = Trueelse:result = self._eval(part[2], ns, pos)if result:self._interpret_codes(part[3], ns, out)break
4
12
4
82
0
194
206
194
self,parts,ns,out
[]
None
{"Assign": 4, "Expr": 1, "For": 1, "If": 2}
3
13
3
["isinstance", "self._eval", "self._interpret_codes"]
0
[]
The function (_interpret_if) defined within the public class called Template.The function start at line 194 and ends at 206. It contains 12 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [194.0] and does not return any value. It declares 3.0 functions, and It has 3.0 funct...
pasteorg_paste
Template
public
0
0
_eval
def _eval(self, code, ns, pos):__traceback_hide__ = Truetry:value = eval(code, ns)return valueexcept Exception:exc_info = sys.exc_info()e = exc_info[1]if getattr(e, 'args'):arg0 = e.args[0]else:arg0 = str(e)e.args = (self._add_line_info(arg0, pos),)reraise(exc_info[0], e, exc_info[2])
3
14
4
95
0
208
221
208
self,code,ns,pos
[]
Returns
{"Assign": 7, "Expr": 1, "If": 1, "Return": 1, "Try": 1}
6
14
6
["eval", "sys.exc_info", "getattr", "str", "self._add_line_info", "reraise"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.55413314_dbbs_lab_bsb.packages.bsb_core.tests.test_configuration_py.TestTypes.test_evaluation"]
The function (_eval) defined within the public class called Template.The function start at line 208 and ends at 221. It contains 14 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [208.0], and this function return a value. It declares 6.0 functions, It has 6.0 functions call...
pasteorg_paste
Template
public
0
0
_exec
def _exec(self, code, ns, pos):__traceback_hide__ = Truetry:exec(code, ns)except Exception:exc_info = sys.exc_info()e = exc_info[1]e.args = (self._add_line_info(e.args[0], pos),)reraise(exc_info[0], e, exc_info[2])
2
9
4
72
0
223
231
223
self,code,ns,pos
[]
None
{"Assign": 4, "Expr": 2, "Try": 1}
4
9
4
["exec", "sys.exc_info", "self._add_line_info", "reraise"]
0
[]
The function (_exec) defined within the public class called Template.The function start at line 223 and ends at 231. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [223.0] and does not return any value. It declares 4.0 functions, and It has 4.0 functions call...
pasteorg_paste
Template
public
0
0
_repr
def _repr(self, value, pos):__traceback_hide__ = Truetry:if value is None:return ''value = str(value)except Exception:exc_info = sys.exc_info()e = exc_info[1]e.args = (self._add_line_info(e.args[0], pos),)reraise(exc_info[0], e, exc_info[2])else:if self._unicode and isinstance(value, bytes):if not self.decode_encoding:...
9
25
3
154
0
233
257
233
self,value,pos
[]
Returns
{"Assign": 7, "Expr": 1, "If": 5, "Return": 2, "Try": 1}
10
25
10
["str", "sys.exc_info", "self._add_line_info", "reraise", "isinstance", "UnicodeDecodeError", "value.decode", "isinstance", "UnicodeEncodeError", "value.encode"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.HTMLTemplate._repr"]
The function (_repr) defined within the public class called Template.The function start at line 233 and ends at 257. It contains 25 lines of code and it has a cyclomatic complexity of 9. It takes 3 parameters, represented as [233.0], and this function return a value. It declares 10.0 functions, It has 10.0 functions ca...
pasteorg_paste
Template
public
0
0
_add_line_info
def _add_line_info(self, msg, pos):msg = "%s at line %s column %s" % (msg, pos[0], pos[1])if self.name:msg += " in file %s" % self.namereturn msg
2
6
3
40
0
260
265
260
self,msg,pos
[]
Returns
{"Assign": 1, "AugAssign": 1, "If": 1, "Return": 1}
0
6
0
[]
0
[]
The function (_add_line_info) defined within the public class called Template.The function start at line 260 and ends at 265. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [260.0], and this function return a value..
pasteorg_paste
public
public
0
0
sub
def sub(content, **kw):name = kw.get('__name')tmpl = Template(content, name=name)return tmpl.substitute(kw)
1
4
2
33
2
267
270
267
content,**kw
['name', 'tmpl']
Returns
{"Assign": 2, "Return": 1}
3
4
3
["kw.get", "Template", "tmpl.substitute"]
14
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16851155_pbui_bobbit.src.bobbit.modules.humanity_py.humanity", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.s3.s3_path_py.S3Path.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Da...
The function (sub) defined within the public class called public.The function start at line 267 and ends at 270. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [267.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called in...
pasteorg_paste
public
public
0
0
paste_script_template_renderer
def paste_script_template_renderer(content, vars, filename=None):tmpl = Template(content, name=filename)return tmpl.substitute(vars)
1
3
3
28
1
272
274
272
content,vars,filename
['tmpl']
Returns
{"Assign": 1, "Return": 1}
2
3
2
["Template", "tmpl.substitute"]
0
[]
The function (paste_script_template_renderer) defined within the public class called public.The function start at line 272 and ends at 274. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [272.0], and this function return a value. It declares 2.0 functions, and...
pasteorg_paste
TemplateError
public
0
1
__init__
def __init__(self, **kw):for name, value in kw.items():setattr(self, name, value)
2
3
2
27
0
278
280
278
self,message,position,name
[]
None
{"Assign": 3}
0
4
0
[]
6,814
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content....
The function (__init__) defined within the public class called TemplateError, that inherit another class.The function start at line 278 and ends at 280. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [278.0] and does not return any value. It has 6814.0 functio...
pasteorg_paste
bunch
public
0
1
__setattr__
def __setattr__(self, name, value):self[name] = value
1
2
3
15
0
282
283
282
self,name,value
[]
None
{"Assign": 1}
0
2
0
[]
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 bunch, that inherit another class.The function start at line 282 and ends at 283. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [282.0] and does not return any value. It has 28.0 functions call...
pasteorg_paste
bunch
public
0
1
__getattr__
def __getattr__(self, name):try:return self[name]except KeyError:raise AttributeError(name)
2
5
2
22
0
285
289
285
self,name
[]
Returns
{"Return": 1, "Try": 1}
1
5
1
["AttributeError"]
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 bunch, that inherit another class.The function start at line 285 and ends at 289. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [285.0], and this function return a value. It declare 1.0 functio...
pasteorg_paste
bunch
public
0
1
__getitem__
def __getitem__(self, key):if 'default' in self:try:return dict.__getitem__(self, key)except KeyError:return dict.__getitem__(self, 'default')else:return dict.__getitem__(self, key)
3
8
2
46
0
291
298
291
self,key
[]
Returns
{"If": 1, "Return": 3, "Try": 1}
3
8
3
["dict.__getitem__", "dict.__getitem__", "dict.__getitem__"]
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 bunch, that inherit another class.The function start at line 291 and ends at 298. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [291.0], and this function return a value. It declares 3.0 functi...
pasteorg_paste
Template
public
0
0
__repr__
def __repr__(self):items = [(k, v) for k, v in self.items()]items.sort()return '<%s %s>' % (self.__class__.__name__,' '.join(['%s=%r' % (k, v) for k, v in items]))
3
7
1
60
0
300
306
300
self
[]
Returns
{"Return": 1}
2
4
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 Template.The function start at line 300 and ends at 306. It contains 7 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 2.0 functions, It has 2.0 functions called...
pasteorg_paste
TemplateError
public
0
1
__init__
def __init__(self, value):self.value = value
1
2
2
12
0
313
314
313
self,message,position,name
[]
None
{"Assign": 3}
0
4
0
[]
6,814
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content....
The function (__init__) defined within the public class called TemplateError, that inherit another class.The function start at line 313 and ends at 314. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [313.0] and does not return any value. It has 6814.0 functio...
pasteorg_paste
TemplateError
public
0
1
__str__
def __str__(self):return self.value
1
2
1
9
0
315
316
315
self
[]
Returns
{"Assign": 1, "AugAssign": 1, "If": 1, "Return": 1}
0
6
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 TemplateError, that inherit another class.The function start at line 315 and ends at 316. 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 ...
pasteorg_paste
Template
public
0
0
__repr__
def __repr__(self):return '<%s %r>' % (self.__class__.__name__, self.value)
1
3
1
19
0
317
319
317
self
[]
Returns
{"Return": 1}
2
4
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 Template.The function start at line 317 and ends at 319. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declares 2.0 functions, It has 2.0 functions called...
pasteorg_paste
public
public
0
0
html_quote
def html_quote(value):if value is None:return ''if not isinstance(value, str):value = str(value)value = escape(value, 1)return value
3
7
1
37
1
321
327
321
value
['value']
Returns
{"Assign": 2, "If": 2, "Return": 2}
3
7
3
["isinstance", "str", "escape"]
11
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.evalexception.middleware_py.get_debug_info", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.evalexception.middleware_py.make_table", "_.content.gdrive.MyDri...
The function (html_quote) defined within the public class called public.The function start at line 321 and ends at 327. It contains 7 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions called...
pasteorg_paste
public
public
0
0
url
def url(v):if not isinstance(v, str):v = str(v)return quote(v)
2
4
1
25
1
329
332
329
v
['v']
Returns
{"Assign": 1, "If": 1, "Return": 1}
3
4
3
["isinstance", "str", "quote"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3513788_docker_archive_docker_registry.tests.test_tags_py.TestTags.test_tag_name_validation", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3694126_pythonindia_wye.wye.organisations.views_py.OrganisationMemberAdd.ge...
The function (url) defined within the public class called public.The function start at line 329 and ends at 332. It contains 4 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 3.0 functions, It has 3.0 functions called inside...
pasteorg_paste
public
public
0
0
attr
def attr(**kw):kw = sorted(kw.items())parts = []for name, value in kw:if value is None:continueif name.endswith('_'):name = name[:-1]parts.append('%s="%s"' % (html_quote(name), html_quote(value)))return html(' '.join(parts))
4
10
1
77
3
334
343
334
**kw
['kw', 'parts', 'name']
Returns
{"Assign": 3, "Expr": 1, "For": 1, "If": 2, "Return": 1}
8
10
8
["sorted", "kw.items", "name.endswith", "parts.append", "html_quote", "html_quote", "html", "join"]
123
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_parser_py.TootParser.handle_endtag", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3637699_magicalraccoon_tootstream.src.tootstream.toot_py.about", "_.content.gd...
The function (attr) defined within the public class called public.The function start at line 334 and ends at 343. It contains 10 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 8.0 functions, It has 8.0 functions called insi...
pasteorg_paste
Template
public
0
0
_repr
def _repr(self, value, pos):plain = Template._repr(self, value, pos)if isinstance(value, html):return plainelse:return html_quote(plain)
2
6
3
38
0
354
359
354
self,value,pos
[]
Returns
{"Assign": 7, "Expr": 1, "If": 5, "Return": 2, "Try": 1}
10
25
10
["str", "sys.exc_info", "self._add_line_info", "reraise", "isinstance", "UnicodeDecodeError", "value.decode", "isinstance", "UnicodeEncodeError", "value.encode"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.HTMLTemplate._repr"]
The function (_repr) defined within the public class called Template.The function start at line 354 and ends at 359. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [354.0], and this function return a value. It declares 10.0 functions, It has 10.0 functions cal...
pasteorg_paste
public
public
0
0
sub_html
def sub_html(content, **kw):name = kw.get('__name')tmpl = HTMLTemplate(content, name=name)return tmpl.substitute(kw)
1
4
2
33
2
361
364
361
content,**kw
['name', 'tmpl']
Returns
{"Assign": 2, "Return": 1}
3
4
3
["kw.get", "HTMLTemplate", "tmpl.substitute"]
0
[]
The function (sub_html) defined within the public class called public.The function start at line 361 and ends at 364. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [361.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functions...
pasteorg_paste
public
public
0
0
lex
def lex(s, name=None, trim_whitespace=True):"""Lex a string into chunks:>>> lex('hey')['hey']>>> lex('hey {{you}}')['hey ', ('you', (1, 7))]>>> lex('hey {{')Traceback (most recent call last):...TemplateError: No }} to finish last expression at line 1 column 7>>> lex('hey }}')Traceback (most recent call last):...Templat...
11
33
3
208
7
371
424
371
s,name,trim_whitespace
['last', 'pos', 'in_expr', 'chunks', 'part', 'last_pos', 'expr']
Returns
{"Assign": 13, "Expr": 4, "For": 1, "If": 7, "Return": 1}
14
54
14
["token_re.finditer", "match.group", "find_position", "match.end", "TemplateError", "TemplateError", "match.start", "chunks.append", "chunks.append", "match.start", "match.end", "TemplateError", "chunks.append", "trim_lex"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3928915_donnemartin_gitsome.xonsh.ply.test.testcpp_py.preprocessing", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse"]
The function (lex) defined within the public class called public.The function start at line 371 and ends at 424. It contains 33 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [371.0], and this function return a value. It declares 14.0 functions, It has 14.0 functions calle...
pasteorg_paste
public
public
0
0
trim_lex
def trim_lex(tokens):r"""Takes a lexed set of tokens, and removes whitespace when there isa directive on a line by itself: >>> tokens = lex('{{if x}}\nx\n{{endif}}\ny', trim_whitespace=False) >>> tokens [('if x', (1, 3)), '\nx\n', ('endif', (3, 3)), '\ny'] >>> trim_lex(tokens) [('if x', (1, 3)), 'x\n', ('endif', (3, 3)...
15
30
1
208
5
431
472
431
tokens
['current', 'next', 'm', 'item', 'prev']
Returns
{"Assign": 12, "Expr": 1, "For": 1, "If": 8, "Return": 1}
13
42
13
["range", "len", "isinstance", "statement_re.search", "len", "isinstance", "isinstance", "trail_whitespace_re.search", "lead_whitespace_re.search", "trail_whitespace_re.search", "m.start", "lead_whitespace_re.search", "m.end"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.lex"]
The function (trim_lex) defined within the public class called public.The function start at line 431 and ends at 472. It contains 30 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 13.0 functions, It has 13.0 functions call...
pasteorg_paste
public
public
0
0
find_position
def find_position(string, index):"""Given a string and index, return (line, column)"""leading = string[:index].splitlines()return (len(leading), len(leading[-1])+1)
1
3
2
37
1
475
478
475
string,index
['leading']
Returns
{"Assign": 1, "Expr": 1, "Return": 1}
3
4
3
["splitlines", "len", "len"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.lex"]
The function (find_position) defined within the public class called public.The function start at line 475 and ends at 478. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [475.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions...
pasteorg_paste
public
public
0
0
parse
def parse(s, name=None):r"""Parses a string into a kind of AST>>> parse('{{x}}')[('expr', (1, 3), 'x')]>>> parse('foo')['foo']>>> parse('{{if x}}test{{endif}}')[('cond', (1, 3), ('if', (1, 3), 'x', ['test']))]>>> parse('series->{{for x in y}}x={{x}}{{endfor}}')['series->', ('for', (1, 11), ('x',), 'y', ['x=', ('expr', ...
2
7
2
46
2
480
535
480
s,name
['result', 'tokens']
Returns
{"Assign": 3, "Expr": 2, "Return": 1, "While": 1}
3
56
3
["lex", "parse_expr", "result.append"]
177
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3554290_abakan_zz_ablog.ablog.post_py.process_postlist", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3567358_coursera_dataduct.dataduct.pipeline.schedule_py.Schedule.__init__", "_.content.gdrive.MyDrive.Phd_Thesis...
The function (parse) defined within the public class called public.The function start at line 480 and ends at 535. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [480.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called ...
pasteorg_paste
public
public
0
0
parse_expr
def parse_expr(tokens, name, context=()):if isinstance(tokens[0], str):return tokens[0], tokens[1:]expr, pos = tokens[0]expr = expr.strip()if expr.startswith('py:'):expr = expr[3:].lstrip(' \t')if expr.startswith('\n'):expr = expr[1:]else:if '\n' in expr:raise TemplateError('Multi-line py blocks must start with a newli...
15
43
3
343
1
537
579
537
tokens,name,context
['expr']
Returns
{"Assign": 4, "If": 13, "Return": 8}
19
43
19
["isinstance", "expr.strip", "expr.startswith", "lstrip", "expr.startswith", "TemplateError", "TemplateError", "expr.startswith", "parse_cond", "expr.startswith", "TemplateError", "expr.split", "TemplateError", "TemplateError", "expr.startswith", "parse_for", "expr.startswith", "parse_default", "expr.startswith"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse_for", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.O...
The function (parse_expr) defined within the public class called public.The function start at line 537 and ends at 579. It contains 43 lines of code and it has a cyclomatic complexity of 15. It takes 3 parameters, represented as [537.0], and this function return a value. It declares 19.0 functions, It has 19.0 function...
pasteorg_paste
public
public
0
0
parse_cond
def parse_cond(tokens, name, context):start = tokens[0][1]pieces = []context = context + ('if',)while 1:if not tokens:raise TemplateError('Missing {{endif}}',position=start, name=name)if (isinstance(tokens[0], tuple)and tokens[0][0] == 'endif'):return ('cond', start) + tuple(pieces), tokens[1:]next, tokens = parse_one_...
5
14
3
108
3
581
594
581
tokens,name,context
['context', 'start', 'pieces']
Returns
{"Assign": 4, "Expr": 1, "If": 2, "Return": 1, "While": 1}
5
14
5
["TemplateError", "isinstance", "tuple", "parse_one_cond", "pieces.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse_expr"]
The function (parse_cond) defined within the public class called public.The function start at line 581 and ends at 594. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [581.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions c...
pasteorg_paste
public
public
0
0
parse_one_cond
def parse_one_cond(tokens, name, context):(first, pos), tokens = tokens[0], tokens[1:]content = []if first.endswith(':'):first = first[:-1]if first.startswith('if '):part = ('if', pos, first[3:].lstrip(), content)elif first.startswith('elif '):part = ('elif', pos, first[5:].lstrip(), content)elif first == 'else':part =...
11
25
3
219
3
596
620
596
tokens,name,context
['content', 'first', 'part']
Returns
{"Assign": 7, "Expr": 1, "If": 6, "Return": 1, "While": 1}
10
25
10
["first.endswith", "first.startswith", "lstrip", "first.startswith", "lstrip", "TemplateError", "isinstance", "startswith", "parse_expr", "content.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse_cond"]
The function (parse_one_cond) defined within the public class called public.The function start at line 596 and ends at 620. It contains 25 lines of code and it has a cyclomatic complexity of 11. It takes 3 parameters, represented as [596.0], and this function return a value. It declares 10.0 functions, It has 10.0 func...
pasteorg_paste
public
public
0
0
parse_for
def parse_for(tokens, name, context):first, pos = tokens[0]tokens = tokens[1:]context = ('for',) + contextcontent = []assert first.startswith('for ')if first.endswith(':'):first = first[:-1]first = first[3:].strip()match = in_re.search(first)if not match:raise TemplateError('Bad for (no "in") in %r' % first,position=po...
10
33
3
253
7
622
654
622
tokens,name,context
['tokens', 'content', 'first', 'context', 'vars', 'match', 'expr']
Returns
{"Assign": 11, "Expr": 1, "If": 5, "Return": 1, "While": 1}
17
33
17
["first.startswith", "first.endswith", "strip", "in_re.search", "TemplateError", "match.start", "TemplateError", "tuple", "v.strip", "split", "match.start", "v.strip", "match.end", "TemplateError", "isinstance", "parse_expr", "content.append"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse_expr"]
The function (parse_for) defined within the public class called public.The function start at line 622 and ends at 654. It contains 33 lines of code and it has a cyclomatic complexity of 10. It takes 3 parameters, represented as [622.0], and this function return a value. It declares 17.0 functions, It has 17.0 functions...
pasteorg_paste
public
public
0
0
parse_default
def parse_default(tokens, name, context):first, pos = tokens[0]assert first.startswith('default ')first = first.split(None, 1)[1]parts = first.split('=', 1)if len(parts) == 1:raise TemplateError("Expression must be {{default var=value}}; no = found in %r" % first,position=pos, name=name)var = parts[0].strip()if ',' in ...
4
20
3
148
4
656
675
656
tokens,name,context
['var', 'parts', 'first', 'expr']
Returns
{"Assign": 5, "If": 3, "Return": 1}
10
20
10
["first.startswith", "first.split", "first.split", "len", "TemplateError", "strip", "TemplateError", "var_re.search", "TemplateError", "strip"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.paste.util.template_py.parse_expr"]
The function (parse_default) defined within the public class called public.The function start at line 656 and ends at 675. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [656.0], and this function return a value. It declares 10.0 functions, It has 10.0 functi...
pasteorg_paste
public
public
0
0
fill_command
def fill_command(args=None):import sys, optparse, pkg_resources, osif args is None:args = sys.argv[1:]dist = pkg_resources.get_distribution('Paste')parser = optparse.OptionParser(version=str(dist),usage=_fill_command_usage)parser.add_option('-o', '--output',dest='output',metavar="FILENAME",help="File to write output to...
10
61
1
339
12
684
744
684
args
['dist', 'args', 'parser', 'template_name', 'TemplateClass', 'value', 'template_content', 'f', 'name', 'vars', 'template', 'result']
None
{"Assign": 20, "Expr": 12, "For": 1, "If": 8}
27
61
27
["pkg_resources.get_distribution", "optparse.OptionParser", "str", "parser.add_option", "parser.add_option", "parser.add_option", "parser.parse_args", "len", "print", "print", "dir", "vars.update", "print", "sys.exit", "value.split", "name.startswith", "eval", "sys.stdin.read", "open", "f.read", "f.close", "TemplateCla...
0
[]
The function (fill_command) defined within the public class called public.The function start at line 684 and ends at 744. It contains 61 lines of code and it has a cyclomatic complexity of 10. The function does not take any parameters and does not return any value. It declares 27.0 functions, and It has 27.0 functions...
pasteorg_paste
PrintCatcher
public
0
1
__init__
def __init__(self, default=None, factory=None, paramwriter=None, leave_stdout=False):assert len(filter(lambda x: x is not None,[default, factory, paramwriter])) <= 1, ("You can only provide one of default, factory, or paramwriter")if leave_stdout:assert not default, ("You cannot pass in both default (%r) and ""leave_st...
5
22
5
127
0
69
90
69
self,default,factory,paramwriter,leave_stdout
[]
None
{"Assign": 9, "If": 4}
2
22
2
["len", "filter"]
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 PrintCatcher, that inherit another class.The function start at line 69 and ends at 90. It contains 22 lines of code and it has a cyclomatic complexity of 5. It takes 5 parameters, represented as [69.0] and does not return any value. It declares 2.0 function...
pasteorg_paste
PrintCatcher
public
0
1
write
def write(self, v, currentThread=threading.current_thread):name = currentThread().namecatchers = self._catchersif not catchers.has_key(name):self._defaultfunc(name, v)else:catcher = catchers[name]catcher.write(v)
2
8
3
56
0
92
99
92
self,v,currentThread
[]
None
{"Assign": 3, "Expr": 2, "If": 1}
4
8
4
["currentThread", "catchers.has_key", "self._defaultfunc", "catcher.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 PrintCatcher, that inherit another class.The function start at line 92 and ends at 99. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [92.0] and does not return any value. It declares 4.0 functions, I...
pasteorg_paste
PrintCatcher
public
0
1
seek
def seek(self, *args):# Weird, but Google App Engine is seeking on stdoutname = threading.current_thread().namecatchers = self._catchersif not name in catchers:self._default.seek(*args)else:catchers[name].seek(*args)
2
7
2
49
0
101
108
101
self,*args
[]
None
{"Assign": 2, "Expr": 2, "If": 1}
3
8
3
["threading.current_thread", "self._default.seek", "seek"]
8
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.client._producers_py.FileBodyProducer._determineLength", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3707933_aiortc_aioquic.tests.test_tls_py.reset_buffers", "_.content.gdrive.MyDrive.P...
The function (seek) defined within the public class called PrintCatcher, that inherit another class.The function start at line 101 and ends at 108. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [101.0] and does not return any value. It declares 3.0 functions,...
pasteorg_paste
PrintCatcher
public
0
1
read
def read(self, *args):name = threading.current_thread().namecatchers = self._catchersif not name in catchers:self._default.read(*args)else:catchers[name].read(*args)
2
7
2
49
0
110
116
110
self,*args
[]
None
{"Assign": 2, "Expr": 2, "If": 1}
3
7
3
["threading.current_thread", "self._default.read", "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 PrintCatcher, that inherit another class.The function start at line 110 and ends at 116. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [110.0] and does not return any value. It declares 3.0 functions,...
pasteorg_paste
PrintCatcher
public
0
1
_writedefault
def _writedefault(self, name, v):self._default.write(v)
1
2
3
17
0
119
120
119
self,name,v
[]
None
{"Expr": 1}
1
2
1
["self._default.write"]
0
[]
The function (_writedefault) defined within the public class called PrintCatcher, that inherit another class.The function start at line 119 and ends at 120. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [119.0] and does not return any value. It declare 1.0 fu...
pasteorg_paste
PrintCatcher
public
0
1
_writefactory
def _writefactory(self, name, v):self._factory(name).write(v)
1
2
3
20
0
122
123
122
self,name,v
[]
None
{"Expr": 1}
2
2
2
["write", "self._factory"]
0
[]
The function (_writefactory) defined within the public class called PrintCatcher, that inherit another class.The function start at line 122 and ends at 123. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [122.0] and does not return any value. It declares 2.0 f...
pasteorg_paste
PrintCatcher
public
0
1
_writeparam
def _writeparam(self, name, v):self._paramwriter(name, v)
1
2
3
17
0
125
126
125
self,name,v
[]
None
{"Expr": 1}
1
2
1
["self._paramwriter"]
0
[]
The function (_writeparam) defined within the public class called PrintCatcher, that inherit another class.The function start at line 125 and ends at 126. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [125.0] and does not return any value. It declare 1.0 func...
pasteorg_paste
PrintCatcher
public
0
1
_writeerror
def _writeerror(self, name, v):assert False, ("There is no PrintCatcher output stream for the thread %r"% name)
1
4
3
17
0
128
131
128
self,name,v
[]
None
{}
0
4
0
[]
0
[]
The function (_writeerror) defined within the public class called PrintCatcher, that inherit another class.The function start at line 128 and ends at 131. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [128.0] and does not return any value..
pasteorg_paste
PrintCatcher
public
0
1
register
def register(self, catcher, name=None, currentThread=threading.current_thread):if name is None:name = currentThread().nameself._catchers[name] = catcher
2
5
4
37
0
133
137
133
self,catcher,name,currentThread
[]
None
{"Assign": 2, "If": 1}
1
5
1
["currentThread"]
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 PrintCatcher, that inherit another class.The function start at line 133 and ends at 137. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [133.0] and does not return any value. It declare 1.0 functio...
pasteorg_paste
PrintCatcher
public
0
1
deregister
def deregister(self, name=None, currentThread=threading.current_thread):if name is None:name = currentThread().nameassert self._catchers.has_key(name), ("There is no PrintCatcher catcher for the thread %r" % name)del self._catchers[name]
2
7
3
49
0
139
145
139
self,name,currentThread
[]
None
{"Assign": 1, "If": 1}
2
7
2
["currentThread", "self._catchers.has_key"]
0
[]
The function (deregister) defined within the public class called PrintCatcher, that inherit another class.The function start at line 139 and ends at 145. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [139.0] and does not return any value. It declares 2.0 func...
pasteorg_paste
public
public
0
0
install
def install(**kw):global _printcatcher, _oldstdout, register, deregisterif (not _printcatcher or sys.stdout is not _printcatcher):_oldstdout = sys.stdout_printcatcher = sys.stdout = PrintCatcher(**kw)register = _printcatcher.registerderegister = _printcatcher.deregister
3
7
1
53
4
150
156
150
**kw
['_oldstdout', 'register', '_printcatcher', 'deregister']
None
{"Assign": 4, "If": 1}
1
7
1
["PrintCatcher"]
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 150 and ends at 156. It contains 7 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 inside wh...
pasteorg_paste
public
public
0
0
uninstall
def uninstall():global _printcatcher, _oldstdout, register, deregisterif _printcatcher:sys.stdout = _oldstdout_printcatcher = _oldstdout = Noneregister = not_installed_errorderegister = not_installed_error
2
7
0
31
4
158
164
158
['_oldstdout', 'register', '_printcatcher', 'deregister']
None
{"Assign": 4, "If": 1}
0
7
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675202_galaxyproject_galaxy_lib.galaxy.tools.deps.views_py.DependencyResolversView.uninstall_dependencies", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.72771145_simphony_simphony_osp.tests.test_api_py.TestToolsPi...
The function (uninstall) defined within the public class called public.The function start at line 158 and ends at 164. It contains 7 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 3.0 functions calling this function which are ["_.co...
pasteorg_paste
public
public
0
0
not_installed_error
def not_installed_error(*args, **kw):assert False, ("threadedprint has not yet been installed (call ""threadedprint.install())")
1
4
2
16
0
166
169
166
*args,**kw
[]
None
{}
0
4
0
[]
0
[]
The function (not_installed_error) defined within the public class called public.The function start at line 166 and ends at 169. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [166.0] and does not return any value..
pasteorg_paste
PrintCatcher
public
0
1
__init__
def __init__(self, default=None, factory=None, paramwriter=None):assert len(filter(lambda x: x is not None,[default, factory, paramwriter])) <= 1, ("You can only provide one of default, factory, or paramwriter")if default:self._defaultfunc = self._readdefaultelif factory:self._defaultfunc = self._readfactoryelif paramw...
4
16
4
105
0
175
190
175
self,default,factory,paramwriter,leave_stdout
[]
None
{"Assign": 9, "If": 4}
2
22
2
["len", "filter"]
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 PrintCatcher, that inherit another class.The function start at line 175 and ends at 190. It contains 16 lines of code and it has a cyclomatic complexity of 4. It takes 4 parameters, represented as [175.0] and does not return any value. It declares 2.0 funct...
pasteorg_paste
PrintCatcher
public
0
1
read
def read(self, size=None, currentThread=threading.current_thread):name = currentThread().namecatchers = self._catchersif not catchers.has_key(name):return self._defaultfunc(name, size)else:catcher = catchers[name]return catcher.read(size)
2
8
3
60
0
192
199
192
self,*args
[]
None
{"Assign": 2, "Expr": 2, "If": 1}
3
7
3
["threading.current_thread", "self._default.read", "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 PrintCatcher, that inherit another class.The function start at line 192 and ends at 199. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [192.0] and does not return any value. It declares 3.0 functions,...
pasteorg_paste
StdinCatcher
public
0
1
_readdefault
def _readdefault(self, name, size):self._default.read(size)
1
2
3
17
0
201
202
201
self,name,size
[]
None
{"Expr": 1}
1
2
1
["self._default.read"]
0
[]
The function (_readdefault) defined within the public class called StdinCatcher, that inherit another class.The function start at line 201 and ends at 202. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [201.0] and does not return any value. It declare 1.0 fun...
pasteorg_paste
StdinCatcher
public
0
1
_readfactory
def _readfactory(self, name, size):self._factory(name).read(size)
1
2
3
20
0
204
205
204
self,name,size
[]
None
{"Expr": 1}
2
2
2
["read", "self._factory"]
0
[]
The function (_readfactory) defined within the public class called StdinCatcher, that inherit another class.The function start at line 204 and ends at 205. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [204.0] and does not return any value. It declares 2.0 fu...
pasteorg_paste
StdinCatcher
public
0
1
_readparam
def _readparam(self, name, size):self._paramreader(name, size)
1
2
3
17
0
207
208
207
self,name,size
[]
None
{"Expr": 1}
1
2
1
["self._paramreader"]
0
[]
The function (_readparam) defined within the public class called StdinCatcher, that inherit another class.The function start at line 207 and ends at 208. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [207.0] and does not return any value. It declare 1.0 funct...
pasteorg_paste
StdinCatcher
public
0
1
_readerror
def _readerror(self, name, size):assert False, ("There is no StdinCatcher output stream for the thread %r"% name)
1
4
3
17
0
210
213
210
self,name,size
[]
None
{}
0
4
0
[]
0
[]
The function (_readerror) defined within the public class called StdinCatcher, that inherit another class.The function start at line 210 and ends at 213. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [210.0] and does not return any value..
pasteorg_paste
PrintCatcher
public
0
1
register
def register(self, catcher, name=None, currentThread=threading.current_thread):if name is None:name = currentThread().nameself._catchers[name] = catcher
2
5
4
37
0
215
219
133
self,catcher,name,currentThread
[]
None
{"Assign": 2, "If": 1}
1
5
1
["currentThread"]
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 PrintCatcher, that inherit another class.The function start at line 215 and ends at 219. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [133.0] and does not return any value. It declare 1.0 functio...
pasteorg_paste
PrintCatcher
public
0
1
deregister
def deregister(self, catcher, name=None, currentThread=threading.current_thread):if name is None:name = currentThread().nameassert self._catchers.has_key(name), ("There is no StdinCatcher catcher for the thread %r" % name)del self._catchers[name]
2
7
4
51
0
221
227
221
self,name,currentThread
[]
None
{"Assign": 1, "If": 1}
2
7
2
["currentThread", "self._catchers.has_key"]
0
[]
The function (deregister) defined within the public class called PrintCatcher, that inherit another class.The function start at line 221 and ends at 227. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 4 parameters, represented as [221.0] and does not return any value. It declares 2.0 func...
pasteorg_paste
public
public
0
0
install_stdin
def install_stdin(**kw):global _stdincatcher, _oldstdin, register_stdin, deregister_stdinif not _stdincatcher:_oldstdin = sys.stdin_stdincatcher = sys.stdin = StdinCatcher(**kw)register_stdin = _stdincatcher.registerderegister_stdin = _stdincatcher.deregister
2
7
1
44
4
232
238
232
**kw
['_stdincatcher', '_oldstdin', 'deregister_stdin', 'register_stdin']
None
{"Assign": 4, "If": 1}
1
7
1
["StdinCatcher"]
0
[]
The function (install_stdin) defined within the public class called public.The function start at line 232 and ends at 238. It contains 7 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, and It has 1.0 function calle...
pasteorg_paste
public
public
0
0
uninstall_stdin
def uninstall_stdin():global _stdincatcher, _oldstdin, register_stdin, deregister_stdinif _stdincatcher:sys.stdin = _oldstdin_stdincatcher = _oldstdin = Noneregister_stdin = deregister_stdin = not_installed_error_stdin
2
6
0
30
4
240
245
240
['_stdincatcher', '_oldstdin', 'deregister_stdin', 'register_stdin']
None
{"Assign": 3, "If": 1}
0
6
0
[]
0
[]
The function (uninstall_stdin) defined within the public class called public.The function start at line 240 and ends at 245. 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..
pasteorg_paste
public
public
0
0
not_installed_error_stdin
def not_installed_error_stdin(*args, **kw):assert False, ("threadedprint has not yet been installed for stdin (call ""threadedprint.install_stdin())")
1
4
2
16
0
247
250
247
*args,**kw
[]
None
{}
0
4
0
[]
0
[]
The function (not_installed_error_stdin) defined within the public class called public.The function start at line 247 and ends at 250. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [247.0] and does not return any value..
pasteorg_paste
public
public
0
0
__init__
def __init__(self):self.__dict__['__objs'] = {}
1
2
1
14
0
22
23
22
null
[]
None
null
0
0
0
null
0
null
The function (__init__) defined within the public class called public.The function start at line 22 and ends at 23. 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
__getattr__
def __getattr__(self, attr, g=thread.get_ident):try:return self.__dict__['__objs'][g()][attr]except KeyError:raise AttributeError("No variable %s defined for the thread %s"% (attr, g()))
2
7
3
46
0
25
31
25
null
[]
None
null
0
0
0
null
0
null
The function (__getattr__) defined within the public class called public.The function start at line 25 and ends at 31. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [25.0] and does not return any value..
pasteorg_paste
public
public
0
0
__setattr__
def __setattr__(self, attr, value, g=thread.get_ident):self.__dict__['__objs'].setdefault(g(), {})[attr] = value
1
2
4
36
0
33
34
33
null
[]
None
null
0
0
0
null
0
null
The function (__setattr__) defined within the public class called public.The function start at line 33 and ends at 34. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [33.0] and does not return any value..
pasteorg_paste
public
public
0
0
__delattr__
def __delattr__(self, attr, g=thread.get_ident):try:del self.__dict__['__objs'][g()][attr]except KeyError:raise AttributeError("No variable %s defined for thread %s"% (attr, g()))
2
7
3
46
0
36
42
36
null
[]
None
null
0
0
0
null
0
null
The function (__delattr__) defined within the public class called public.The function start at line 36 and ends at 42. It contains 7 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [36.0] and does not return any value..
pasteorg_paste
public
public
0
0
setup_module
def setup_module():global oldpath, pyexelinkoldpath = os.environ.get('PATH', None)os.environ['PATH'] = data_dir + os.path.pathsep + oldpathpyexelink = os.path.join(data_dir, "python")try:os.unlink(pyexelink)except OSError:passos.symlink(sys.executable, pyexelink)
2
10
0
70
2
18
27
18
['pyexelink', 'oldpath']
None
{"Assign": 3, "Expr": 2, "Try": 1}
4
10
4
["os.environ.get", "os.path.join", "os.unlink", "os.symlink"]
0
[]
The function (setup_module) defined within the public class called public.The function start at line 18 and ends at 27. It contains 10 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 4.0 functions, and It has 4.0 functions call...
pasteorg_paste
public
public
0
0
teardown_module
def teardown_module():global oldpath, pyexelinkos.unlink(pyexelink)if oldpath is not None:os.environ['PATH'] = oldpathelse:del os.environ['PATH']
2
7
0
37
0
30
36
30
[]
None
{"Assign": 1, "Expr": 1, "If": 1}
1
7
1
["os.unlink"]
0
[]
The function (teardown_module) defined within the public class called public.The function start at line 30 and ends at 36. It contains 7 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, and It has 1.0 function calle...
pasteorg_paste
public
public
0
0
test_ok
def test_ok():app = TestApp(CGIApplication({}, script='ok.cgi', path=[data_dir]))res = app.get('')assert res.header('content-type') == 'text/html; charset=UTF-8'assert res.full_status == '200 Okay'assert 'This is the body' in res
1
6
0
51
2
38
43
38
['res', 'app']
None
{"Assign": 2}
4
6
4
["TestApp", "CGIApplication", "app.get", "res.header"]
0
[]
The function (test_ok) defined within the public class called public.The function start at line 38 and ends at 43. 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 declares 4.0 functions, and It has 4.0 functions called ins...
pasteorg_paste
public
public
0
0
test_form
def test_form():app = TestApp(CGIApplication({}, script='form.cgi', path=[data_dir]))res = app.post('', params={'name': b'joe'}, upload_files=[('up', 'file.txt', b'x'*10000)])assert 'file.txt' in resassert 'joe' in resassert 'x'*10000 in res
1
7
0
70
2
45
51
45
['res', 'app']
None
{"Assign": 2}
3
7
3
["TestApp", "CGIApplication", "app.post"]
0
[]
The function (test_form) defined within the public class called public.The function start at line 45 and ends at 51. It contains 7 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, and It has 3.0 functions called i...
pasteorg_paste
public
public
0
0
test_error
def test_error():app = TestApp(CGIApplication({}, script='error.cgi', path=[data_dir]))pytest.raises(CGIError, app.get, '', status=500)
1
3
0
40
1
53
55
53
['app']
None
{"Assign": 1, "Expr": 1}
3
3
3
["TestApp", "CGIApplication", "pytest.raises"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.70408386_unionai_oss_pandera.tests.polars.test_polars_typing_py.TestDataFrame.test_to_format_write_buffer_method"]
The function (test_error) defined within the public class called public.The function start at line 53 and ends at 55. 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 declares 3.0 functions, It has 3.0 functions called insid...
pasteorg_paste
public
public
0
0
test_stderr
def test_stderr():app = TestApp(CGIApplication({}, script='stderr.cgi', path=[data_dir]))res = app.get('', expect_errors=True)assert res.status == 500assert 'error' in resassert 'some data' in res.errors
1
6
0
52
2
57
62
57
['res', 'app']
None
{"Assign": 2}
3
6
3
["TestApp", "CGIApplication", "app.get"]
0
[]
The function (test_stderr) defined within the public class called public.The function start at line 57 and ends at 62. 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 declares 3.0 functions, and It has 3.0 functions called...
pasteorg_paste
public
public
0
0
do_request
def do_request(app, expect_status=500):app = lint.middleware(app)app = CgitbMiddleware(app, {}, display=True)app = clear_middleware(app)testapp = TestApp(app)res = testapp.get('', status=expect_status,expect_errors=True)return res
1
8
2
60
3
6
13
6
app,expect_status
['testapp', 'res', 'app']
Returns
{"Assign": 5, "Return": 1}
5
8
5
["lint.middleware", "CgitbMiddleware", "clear_middleware", "TestApp", "testapp.get"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.80560341_prozorroukr_openprocurement_api.docs.tests.base.test_py.DumpsWebTestApp.do_request", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_cgitb_catcher_py.test_after_start", "_.c...
The function (do_request) defined within the public class called public.The function start at line 6 and ends at 13. It contains 8 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [6.0], and this function return a value. It declares 5.0 functions, It has 5.0 functions called ...
pasteorg_paste
public
public
0
0
bad_app
def bad_app():"No argument list!"return None
1
3
0
7
0
20
22
20
[]
Returns
{"Expr": 1, "Return": 1}
0
3
0
[]
0
[]
The function (bad_app) defined within the public class called public.The function start at line 20 and ends at 22. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value..
pasteorg_paste
public
public
0
0
start_response_app
def start_response_app(environ, start_response):"raise error before start_response"raise ValueError("hi")
1
3
2
13
0
24
26
24
environ,start_response
[]
None
{"Expr": 1}
1
3
1
["ValueError"]
0
[]
The function (start_response_app) defined within the public class called public.The function start at line 24 and ends at 26. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [24.0] and does not return any value. It declare 1.0 function, and It has 1.0 function...
pasteorg_paste
public
public
0
0
after_start_response_app
def after_start_response_app(environ, start_response):start_response("200 OK", [('Content-type', 'text/plain')])raise ValueError('error2')
1
3
2
24
0
28
30
28
environ,start_response
[]
None
{"Expr": 1}
2
3
2
["start_response", "ValueError"]
0
[]
The function (after_start_response_app) defined within the public class called public.The function start at line 28 and ends at 30. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [28.0] and does not return any value. It declares 2.0 functions, and It has 2.0 ...
pasteorg_paste
public
public
0
0
iter_app
def iter_app(environ, start_response):start_response("200 OK", [('Content-type', 'text/plain')])return yielder([b'this', b' is ', b' a', None])
1
3
2
35
0
32
34
32
environ,start_response
[]
Returns
{"Expr": 1, "Return": 1}
2
3
2
["start_response", "yielder"]
0
[]
The function (iter_app) defined within the public class called public.The function start at line 32 and ends at 34. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [32.0], and this function return a value. It declares 2.0 functions, and It has 2.0 functions ca...
pasteorg_paste
public
public
0
0
yielder
def yielder(args):for arg in args:if arg is None:raise ValueError("None raises error")yield arg
3
5
1
22
0
36
40
36
args
[]
None
{"Expr": 1, "For": 1, "If": 1}
1
5
1
["ValueError"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_cgitb_catcher_py.iter_app", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_exceptions.test_error_middleware_py.iter_app"]
The function (yielder) defined within the public class called public.The function start at line 36 and ends at 40. 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, It has 1.0 function called inside whic...
pasteorg_paste
public
public
0
0
test_makes_exception
def test_makes_exception():res = do_request(bad_app)print(res)assert 'bad_app() takes 0 positional arguments but 2 were given' in resassert 'iterator = application(environ, start_response_wrapper)' in resassert 'lint.py' in resassert 'cgitb_catcher.py' in res
1
7
0
30
1
46
52
46
['res']
None
{"Assign": 1, "Expr": 1}
2
7
2
["do_request", "print"]
0
[]
The function (test_makes_exception) defined within the public class called public.The function start at line 46 and ends at 52. It contains 7 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, and It has 2.0 functio...
pasteorg_paste
public
public
0
0
test_start_res
def test_start_res():res = do_request(start_response_app)print(res)assert 'ValueError: hi' in resassert 'test_cgitb_catcher.py' in resassert 'line 26, in start_response_app' in res
1
6
0
26
1
54
59
54
['res']
None
{"Assign": 1, "Expr": 1}
2
6
2
["do_request", "print"]
0
[]
The function (test_start_res) defined within the public class called public.The function start at line 54 and ends at 59. 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 declares 2.0 functions, and It has 2.0 functions cal...
pasteorg_paste
public
public
0
0
test_after_start
def test_after_start():res = do_request(after_start_response_app, 200)print(res)assert 'ValueError: error2' in resassert 'line 30' in res
1
5
0
24
1
61
65
61
['res']
None
{"Assign": 1, "Expr": 1}
2
5
2
["do_request", "print"]
0
[]
The function (test_after_start) defined within the public class called public.The function start at line 61 and ends at 65. 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 2.0 functions, and It has 2.0 functions c...
pasteorg_paste
public
public
0
0
test_iter_app
def test_iter_app():res = do_request(iter_app, 200)print(res)assert 'None raises error' in resassert 'yielder' in res
1
5
0
24
1
67
71
67
['res']
None
{"Assign": 1, "Expr": 1}
2
5
2
["do_request", "print"]
0
[]
The function (test_iter_app) defined within the public class called public.The function start at line 67 and ends at 71. 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 2.0 functions, and It has 2.0 functions call...
pasteorg_paste
public
public
0
0
reset_config
def reset_config():while True:try:CONFIG._pop_object()except IndexError:break
3
6
0
18
0
11
16
11
[]
None
{"Expr": 1, "Try": 1, "While": 1}
1
6
1
["CONFIG._pop_object"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_config_py.test_process_config", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_config_py.test_request_config", "_.content.gdrive.MyDrive.Phd_Thesi...
The function (reset_config) defined within the public class called public.The function start at line 11 and ends at 16. 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 inside...
pasteorg_paste
public
public
0
0
app_with_config
def app_with_config(environ, start_response):start_response('200 OK', [('Content-type','text/plain')])lines = ['Variable is: %s\n' % CONFIG[test_key],'Variable is (in environ): %s' % environ['paste.config'][test_key]]lines = [line.encode('utf8') for line in lines]return lines
2
6
2
55
1
18
23
18
environ,start_response
['lines']
Returns
{"Assign": 2, "Expr": 1, "Return": 1}
2
6
2
["start_response", "line.encode"]
0
[]
The function (app_with_config) defined within the public class called public.The function start at line 18 and ends at 23. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [18.0], and this function return a value. It declares 2.0 functions, and It has 2.0 funct...
pasteorg_paste
NestingAppWithConfig
public
0
0
__init__
def __init__(self, app):self.app = app
1
2
2
12
0
26
27
26
self,app
[]
None
{"Assign": 1}
0
2
0
[]
6,814
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.Autotools.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.10922465_openbmc_openbmc_build_scripts.scripts.unit_test_py.CMake.__init__", "_.content....
The function (__init__) defined within the public class called NestingAppWithConfig.The function start at line 26 and ends at 27. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [26.0] and does not return any value. It has 6814.0 functions calling this function...
pasteorg_paste
NestingAppWithConfig
public
0
0
__call__
def __call__(self, environ, start_response):response = self.app(environ, start_response)assert isinstance(response, list)supplement = ['Nesting variable is: %s' % CONFIG[test_key],'Nesting variable is (in environ): %s' % \environ['paste.config'][test_key]]supplement = [line.encode('utf8') for line in supplement]respons...
2
9
3
69
0
29
37
29
self,environ,start_response
[]
Returns
{"Assign": 3, "Expr": 1, "Return": 1}
4
9
4
["self.app", "isinstance", "line.encode", "response.extend"]
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 NestingAppWithConfig.The function start at line 29 and ends at 37. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 3 parameters, represented as [29.0], and this function return a value. It declares 4.0 functions, It has 4.0 fun...
pasteorg_paste
public
public
0
0
test_request_config
def test_request_config():try:config = {test_key: 'test value'}app = ConfigMiddleware(app_with_config, config)res = TestApp(app).get('/')assert 'Variable is: test value' in resassert 'Variable is (in environ): test value' in resfinally:reset_config()
2
9
0
45
3
39
47
39
['config', 'res', 'app']
None
{"Assign": 3, "Expr": 1, "Try": 1}
4
9
4
["ConfigMiddleware", "get", "TestApp", "reset_config"]
0
[]
The function (test_request_config) defined within the public class called public.The function start at line 39 and ends at 47. It contains 9 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 4.0 functions, and It has 4.0 function...
pasteorg_paste
public
public
0
0
test_request_config_multi
def test_request_config_multi():try:config = {test_key: 'test value'}app = ConfigMiddleware(app_with_config, config)config = {test_key: 'nesting value'}app = ConfigMiddleware(NestingAppWithConfig(app), config)res = TestApp(app).get('/')assert 'Variable is: test value' in resassert 'Variable is (in environ): test value'...
2
14
0
75
3
49
62
49
['config', 'res', 'app']
None
{"Assign": 5, "Expr": 2, "Try": 1}
7
14
7
["ConfigMiddleware", "ConfigMiddleware", "NestingAppWithConfig", "get", "TestApp", "print", "reset_config"]
0
[]
The function (test_request_config_multi) defined within the public class called public.The function start at line 49 and ends at 62. It contains 14 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 7.0 functions, and It has 7.0 f...
pasteorg_paste
public
public
0
0
test_process_config
def test_process_config(request_app=test_request_config):try:process_config = {test_key: 'bar', 'process_var': 'foo'}CONFIG.push_process_config(process_config)assert CONFIG[test_key] == 'bar'assert CONFIG['process_var'] == 'foo'request_app()assert CONFIG[test_key] == 'bar'assert CONFIG['process_var'] == 'foo'CONFIG.pop...
2
14
1
90
1
64
81
64
request_app
['process_config']
None
{"Assign": 1, "Expr": 6, "Try": 1}
6
18
6
["CONFIG.push_process_config", "request_app", "CONFIG.pop_process_config", "pytest.raises", "pytest.raises", "reset_config"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_config_py.test_process_config_multi"]
The function (test_process_config) defined within the public class called public.The function start at line 64 and ends at 81. It contains 14 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 6.0 functions, It has 6.0 functions ca...
pasteorg_paste
public
public
0
0
test_process_config_multi
def test_process_config_multi():test_process_config(test_request_config_multi)
1
2
0
8
0
83
84
83
[]
None
{"Expr": 1}
1
2
1
["test_process_config"]
0
[]
The function (test_process_config_multi) defined within the public class called public.The function start at line 83 and ends at 84. 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 func...
pasteorg_paste
public
public
0
0
test_doctests
def test_doctests(filename):filename = os.path.join(os.path.dirname(os.path.dirname(__file__)),filename)failure, total = doctest.testfile(filename, module_relative=False,optionflags=options)assert not failure, "Failure in %r" % filename
1
8
1
56
1
36
43
36
filename
['filename']
None
{"Assign": 2}
5
8
5
["os.path.join", "os.path.dirname", "os.path.dirname", "doctest.testfile", "pytest.mark.parametrize"]
0
[]
The function (test_doctests) defined within the public class called public.The function start at line 36 and ends at 43. It contains 8 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 5.0 functions, and It has 5.0 functions call...
pasteorg_paste
public
public
0
0
test_doctest_mods
def test_doctest_mods(module):module = simple_import(module)failure, total = doctest.testmod(module, optionflags=options)assert not failure, "Failure in %r" % module
1
5
1
32
1
47
51
47
module
['module']
None
{"Assign": 2}
3
5
3
["simple_import", "doctest.testmod", "pytest.mark.parametrize"]
0
[]
The function (test_doctest_mods) defined within the public class called public.The function start at line 47 and ends at 51. 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, and It has 3.0 functions ...
pasteorg_paste
public
public
0
0
simple_app
def simple_app(environ, start_response):start_response("200 OK", [('Content-type', 'text/plain')])return [b'requested page returned']
1
3
2
24
0
5
7
5
environ,start_response
[]
Returns
{"Expr": 1, "Return": 1}
1
3
1
["start_response"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_errordocument_py.auth_docs_app", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_errordocument_py.error_docs_app", "_.content.gdrive.MyDrive.Phd_Th...
The function (simple_app) defined within the public class called public.The function start at line 5 and ends at 7. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [5.0], and this function return a value. It declare 1.0 function, It has 1.0 function called insi...
pasteorg_paste
public
public
0
0
not_found_app
def not_found_app(environ, start_response):start_response("404 Not found", [('Content-type', 'text/plain')])return [b'requested page returned']
1
3
2
24
0
9
11
9
environ,start_response
[]
Returns
{"Expr": 1, "Return": 1}
1
3
1
["start_response"]
0
[]
The function (not_found_app) defined within the public class called public.The function start at line 9 and ends at 11. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [9.0], and this function return a value. It declare 1.0 function, and It has 1.0 function ca...
pasteorg_paste
public
public
0
0
test_ok
def test_ok():app = TestApp(simple_app)res = app.get('')assert res.header('content-type') == 'text/plain'assert res.full_status == '200 OK'assert 'requested page returned' in res
1
6
0
37
2
13
18
13
['res', 'app']
None
{"Assign": 2}
3
6
3
["TestApp", "app.get", "res.header"]
0
[]
The function (test_ok) defined within the public class called public.The function start at line 13 and ends at 18. 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 declares 3.0 functions, and It has 3.0 functions called ins...
pasteorg_paste
public
public
0
0
error_docs_app
def error_docs_app(environ, start_response):if environ['PATH_INFO'] == '/not_found':start_response("404 Not found", [('Content-type', 'text/plain')])return [b'Not found']elif environ['PATH_INFO'] == '/error':start_response("200 OK", [('Content-type', 'text/plain')])return [b'Page not found']else:return simple_app(envir...
3
9
2
66
0
20
28
20
environ,start_response
[]
Returns
{"Expr": 2, "If": 2, "Return": 3}
3
9
3
["start_response", "start_response", "simple_app"]
0
[]
The function (error_docs_app) defined within the public class called public.The function start at line 20 and ends at 28. It contains 9 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [20.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functi...
pasteorg_paste
public
public
0
0
test_error_docs_app
def test_error_docs_app():app = TestApp(error_docs_app)res = app.get('')assert res.header('content-type') == 'text/plain'assert res.full_status == '200 OK'assert 'requested page returned' in resres = app.get('/error')assert res.header('content-type') == 'text/plain'assert res.full_status == '200 OK'assert 'Page not fou...
1
14
0
95
2
30
43
30
['res', 'app']
None
{"Assign": 4}
7
14
7
["TestApp", "app.get", "res.header", "app.get", "res.header", "app.get", "res.header"]
0
[]
The function (test_error_docs_app) defined within the public class called public.The function start at line 30 and ends at 43. It contains 14 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 7.0 functions, and It has 7.0 functio...
pasteorg_paste
public
public
0
0
test_forward
def test_forward():app = forward(error_docs_app, codes={404:'/error'})app = TestApp(RecursiveMiddleware(app))res = app.get('')assert res.header('content-type') == 'text/plain'assert res.full_status == '200 OK'assert 'requested page returned' in resres = app.get('/error')assert res.header('content-type') == 'text/plain'...
1
15
0
112
2
45
60
45
['res', 'app']
None
{"Assign": 5}
9
16
9
["forward", "TestApp", "RecursiveMiddleware", "app.get", "res.header", "app.get", "res.header", "app.get", "res.header"]
0
[]
The function (test_forward) defined within the public class called public.The function start at line 45 and ends at 60. It contains 15 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 9.0 functions, and It has 9.0 functions call...
pasteorg_paste
public
public
0
0
auth_required_app
def auth_required_app(environ, start_response):start_response('401 Unauthorized', [('content-type', 'text/plain'), ('www-authenticate', 'Basic realm="Foo"')])return ['Sign in!']
1
3
2
29
0
62
64
62
environ,start_response
[]
Returns
{"Expr": 1, "Return": 1}
1
3
1
["start_response"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95051027_pasteorg_paste.tests.test_errordocument_py.auth_docs_app"]
The function (auth_required_app) defined within the public class called public.The function start at line 62 and ends at 64. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [62.0], and this function return a value. It declare 1.0 function, It has 1.0 function c...
pasteorg_paste
public
public
0
0
auth_docs_app
def auth_docs_app(environ, start_response):if environ['PATH_INFO'] == '/auth':return auth_required_app(environ, start_response)elif environ['PATH_INFO'] == '/auth_doc':start_response("200 OK", [('Content-type', 'text/html')])return [b'<html>Login!</html>']else:return simple_app(environ, start_response)
3
8
2
56
0
66
73
66
environ,start_response
[]
Returns
{"Expr": 1, "If": 2, "Return": 3}
3
8
3
["auth_required_app", "start_response", "simple_app"]
0
[]
The function (auth_docs_app) defined within the public class called public.The function start at line 66 and ends at 73. It contains 8 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [66.0], and this function return a value. It declares 3.0 functions, and It has 3.0 functio...
pasteorg_paste
public
public
0
0
test_auth_docs_app
def test_auth_docs_app():wsgi_app = forward(auth_docs_app, codes={401: '/auth_doc'})app = TestApp(wsgi_app)res = app.get('/auth_doc')assert res.header('content-type') == 'text/html'res = app.get('/auth', status=401)assert res.header('content-type') == 'text/html'assert res.header('www-authenticate') == 'Basic realm="Fo...
1
9
0
78
3
75
83
75
['wsgi_app', 'res', 'app']
None
{"Assign": 4}
7
9
7
["forward", "TestApp", "app.get", "res.header", "app.get", "res.header", "res.header"]
0
[]
The function (test_auth_docs_app) defined within the public class called public.The function start at line 75 and ends at 83. It contains 9 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 7.0 functions, and It has 7.0 functions...
pasteorg_paste
public
public
0
0
test_bad_error.app
def app(environ, start_response):start_response('404 Not Found', [('content-type', 'text/plain')])return ['not found']
1
3
2
23
0
86
88
86
null
[]
None
null
0
0
0
null
0
null
The function (test_bad_error.app) defined within the public class called public.The function start at line 86 and ends at 88. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [86.0] and does not return any value..
pasteorg_paste
public
public
0
0
test_bad_error
def test_bad_error():def app(environ, start_response):start_response('404 Not Found', [('content-type', 'text/plain')])return ['not found']app = forward(app, {404: '/404.html'})app = TestApp(app)resp = app.get('/test', expect_errors=True)print(resp)
1
6
0
40
2
85
92
85
['resp', 'app']
Returns
{"Assign": 3, "Expr": 2, "Return": 1}
5
8
5
["start_response", "forward", "TestApp", "app.get", "print"]
0
[]
The function (test_bad_error) defined within the public class called public.The function start at line 85 and ends at 92. It contains 6 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 5.0 functions, and It has 5.0 functions...
pasteorg_paste
public
public
0
0
test_data
def test_data():harness = TestApp(DataApp(b'mycontent'))res = harness.get("/")assert 'application/octet-stream' == res.header('content-type')assert '9' == res.header('content-length')assert "<Response 200 OK 'mycontent'>" == repr(res)harness.app.set_content(b"bingles")assert "<Response 200 OK 'bingles'>" == repr(harnes...
1
8
0
68
2
18
25
18
['harness', 'res']
None
{"Assign": 2, "Expr": 1}
9
8
9
["TestApp", "DataApp", "harness.get", "res.header", "res.header", "repr", "harness.app.set_content", "repr", "harness.get"]
0
[]
The function (test_data) defined within the public class called public.The function start at line 18 and ends at 25. It contains 8 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 9.0 functions, and It has 9.0 functions called i...
pasteorg_paste
public
public
0
0
test_cache.build
def build(*args,**kwargs):app = DataApp(b"SomeContent")app.cache_control(*args,**kwargs)return TestApp(app).get("/")
1
4
2
36
0
28
31
28
null
[]
None
null
0
0
0
null
0
null
The function (test_cache.build) defined within the public class called public.The function start at line 28 and ends at 31. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [28.0] and does not return any value..