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
Sema4AI_actions
JsonRpcStreamReaderThread
public
0
1
__init__
def __init__(self, rfile):self._rfile = rfileself._queue = queue.Queue()self._reader_thread = None
1
4
2
26
0
145
148
145
self,rfile,queue,message_consumer
[]
None
{"Assign": 5, "Expr": 1}
1
7
1
["threading.Thread.__init__"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called JsonRpcStreamReaderThread, that inherit another class.The function start at line 145 and ends at 148. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [145.0] and does not return any value. It declar...
Sema4AI_actions
JsonRpcStreamReader
public
0
1
get_read_queue
def get_read_queue(self):return self._queue
1
2
1
9
0
150
151
150
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (get_read_queue) defined within the public class called JsonRpcStreamReader, that inherit another class.The function start at line 150 and ends at 151. 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..
Sema4AI_actions
JsonRpcStreamReader
public
0
1
close
def close(self):pass
1
2
1
6
0
153
154
153
self
[]
None
{}
0
2
0
[]
137
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.__main___py.pre_run_main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535344_amarian12_e_pool_net.p2pool.util.logging_py.LogFile.reopen", "_.content....
The function (close) defined within the public class called JsonRpcStreamReader, that inherit another class.The function start at line 153 and ends at 154. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 137.0 functions...
Sema4AI_actions
JsonRpcStreamReader
public
0
1
listen
def listen(self, message_consumer):"""Blocking call to listen for messages on the rfile.Args:message_consumer (fn): function that is passed each message as it is read off the socket."""self._reader_thread = JsonRpcStreamReaderThread(self._rfile, self._queue, message_consumer)self._reader_thread.start()try:while True:ms...
8
24
2
103
0
159
191
159
self,message_consumer
[]
None
{"Assign": 2, "Expr": 7, "If": 2, "Try": 2, "While": 1}
9
33
9
["JsonRpcStreamReaderThread", "self._reader_thread.start", "self._queue.get", "hasattr", "msg", "message_consumer", "log.exception", "log.exception", "log.debug"]
0
[]
The function (listen) defined within the public class called JsonRpcStreamReader, that inherit another class.The function start at line 159 and ends at 191. It contains 24 lines of code and it has a cyclomatic complexity of 8. It takes 2 parameters, represented as [159.0] and does not return any value. It declares 9.0 ...
Sema4AI_actions
JsonRpcStreamReaderThread
public
0
1
__init__
def __init__(self, wfile, **json_dumps_args):assert wfile is not Noneself._wfile = wfileself._wfile_lock = threading.Lock()self._json_dumps_args = json_dumps_args
1
5
3
34
0
195
199
195
self,rfile,queue,message_consumer
[]
None
{"Assign": 5, "Expr": 1}
1
7
1
["threading.Thread.__init__"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called JsonRpcStreamReaderThread, that inherit another class.The function start at line 195 and ends at 199. It contains 5 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [195.0] and does not return any value. It declar...
Sema4AI_actions
JsonRpcStreamReader
public
0
1
close
def close(self):log.debug("Will close writer")with self._wfile_lock:self._wfile.close()
1
4
1
23
0
201
204
201
self
[]
None
{}
0
2
0
[]
137
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.16379211_lorcalhost_btb_manager_telegram.btb_manager_telegram.__main___py.pre_run_main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535344_amarian12_e_pool_net.p2pool.util.logging_py.LogFile.reopen", "_.content....
The function (close) defined within the public class called JsonRpcStreamReader, that inherit another class.The function start at line 201 and ends at 204. 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 has 137.0 functions...
Sema4AI_actions
JsonRpcStreamWriter
public
0
1
write
def write(self, message):with self._wfile_lock:if self._wfile.closed:log.debug("Unable to write %s (file already closed).", (message,))return Falsetry:if isinstance(message, dict):show_keys = ["command","action_name","action_file","reuse_process",]show = []for key in show_keys:v = message.get(key)if v is not None:show....
7
44
2
210
0
206
252
206
self,message
[]
Returns
{"Assign": 8, "Expr": 9, "For": 1, "If": 4, "Return": 3, "Try": 1, "With": 1}
18
47
18
["log.debug", "isinstance", "message.get", "show.append", "log.debug", "join", "tuple", "log.debug", "tuple", "log.debug", "json.dumps", "body.encode", "len", "content_len_as_str.encode", "stream.write", "stream.write", "stream.flush", "log.exception"]
120
["_.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.3511986_dart_archive_pub_dartlang.third_party.cherrypy.process.plugins_py.PIDFile.start", "_.content.gdrive.My...
The function (write) defined within the public class called JsonRpcStreamWriter, that inherit another class.The function start at line 206 and ends at 252. It contains 44 lines of code and it has a cyclomatic complexity of 7. It takes 2 parameters, represented as [206.0], and this function return a value. It declares 1...
Sema4AI_actions
public
public
0
0
on_teardown_save_result
def on_teardown_save_result(action: IAction):S4_ACTION_RESULT_LOCATION = os.environ.get("S4_ACTION_RESULT_LOCATION", "")if S4_ACTION_RESULT_LOCATION:result = action.resultp = Path(S4_ACTION_RESULT_LOCATION)p.parent.mkdir(parents=True, exist_ok=True)dump = resultif hasattr(result, "model_dump"):# Support for pydanticdum...
3
15
1
101
5
13
31
13
action
['p', 'contents_to_write', 'S4_ACTION_RESULT_LOCATION', 'result', 'dump']
None
{"Assign": 6, "Expr": 2, "If": 2}
7
19
7
["os.environ.get", "Path", "p.parent.mkdir", "hasattr", "result.model_dump", "p.write_text", "json.dumps"]
0
[]
The function (on_teardown_save_result) defined within the public class called public.The function start at line 13 and ends at 31. It contains 15 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 7.0 functions, and It has 7.0 fun...
Sema4AI_actions
public
public
0
0
generate_api_key
def generate_api_key():import secretsreturn secrets.token_urlsafe(32)
1
3
0
13
0
4
7
4
[]
Returns
{"Return": 1}
1
4
1
["secrets.token_urlsafe"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.auth_py.get_api_key"]
The function (generate_api_key) defined within the public class called public.The function start at line 4 and ends at 7. It contains 3 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called ...
Sema4AI_actions
public
public
0
0
get_api_key
def get_api_key(datadir: Path) -> str:api_key_path = datadir / ".api_key"try:api_key = api_key_path.read_text("utf-8")except Exception:api_key = ""if len(api_key) == 0:api_key = generate_api_key()api_key_path.write_text(api_key, "utf-8")return api_key
3
10
1
53
2
10
22
10
datadir
['api_key', 'api_key_path']
str
{"Assign": 4, "Expr": 1, "If": 1, "Return": 1, "Try": 1}
4
13
4
["api_key_path.read_text", "len", "generate_api_key", "api_key_path.write_text"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.d2s_tile", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.90033906_opengeos_leafmap.leafmap.common_py.get_local_tile_layer", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cr...
The function (get_api_key) defined within the public class called public.The function start at line 10 and ends at 22. It contains 10 lines of code and it has a cyclomatic complexity of 3. The function does not take any parameters and does not return any value. It declares 4.0 functions, It has 4.0 functions called ins...
Sema4AI_actions
OnExitContextManager
public
0
0
__init__
def __init__(self, on_exit):self.on_exit = on_exit
1
2
2
12
0
7
8
7
self,on_exit
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called OnExitContextManager.The function start at line 7 and ends at 8. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [7.0] and does not return any value. It has 6243.0 functions calling this function wh...
Sema4AI_actions
OnExitContextManager
public
0
0
__enter__
def __enter__(self):pass
1
2
1
6
0
10
11
10
self
[]
None
{}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662468_esss_jobs_done10.tests.server.test_server_py.test_error_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__enter__", "_...
The function (__enter__) defined within the public class called OnExitContextManager.The function start at line 10 and ends at 11. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 4.0 functions calling this function whic...
Sema4AI_actions
OnExitContextManager
public
0
0
__exit__
def __exit__(self, exc_type, exc_val, exc_tb):self.on_exit()
1
2
4
16
0
13
14
13
self,exc_type,exc_val,exc_tb
[]
None
{"Expr": 1}
1
2
1
["self.on_exit"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.furious.context.auto_context_py.AutoContext.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__exit__",...
The function (__exit__) defined within the public class called OnExitContextManager.The function start at line 13 and ends at 14. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 4 parameters, represented as [13.0] and does not return any value. It declare 1.0 function, It has 1.0 function ...
Sema4AI_actions
OnExitContextManager
public
0
0
__init__
def __init__(self, reversed=False, raise_exceptions=False):self.raise_exceptions = raise_exceptionsself._reversed = reversedself._callbacks = ()
1
4
3
29
0
24
27
24
self,on_exit
[]
None
{"Assign": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called OnExitContextManager.The function start at line 24 and ends at 27. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [24.0] and does not return any value. It has 6243.0 functions calling this function...
Sema4AI_actions
Callback
public
0
0
register
def register(self, callback) -> OnExitContextManager:self._callbacks = self._callbacks + (callback,)# Enable using as a context manager to automatically call the unregister.return OnExitContextManager(lambda: self.unregister(callback))
1
3
2
33
0
29
33
29
self,callback
[]
OnExitContextManager
{"Assign": 1, "Return": 1}
2
5
2
["OnExitContextManager", "self.unregister"]
904
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.json.test_json_server_py.json_server", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tests.integration.test_error_handling_py.mock_server",...
The function (register) defined within the public class called Callback.The function start at line 29 and ends at 33. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [29.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions called in...
Sema4AI_actions
Callback
public
0
0
unregister
def unregister(self, callback) -> None:self._callbacks = tuple(x for x in self._callbacks if x != callback)
3
2
2
27
0
35
36
35
self,callback
[]
None
{"Assign": 1}
1
2
1
["tuple"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.actions.src.sema4ai.actions._hooks_py.SessionCallback.unregister"]
The function (unregister) defined within the public class called Callback.The function start at line 35 and ends at 36. It contains 2 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [35.0] and does not return any value. It declare 1.0 function, It has 1.0 function called ins...
Sema4AI_actions
Callback
public
0
0
__len__
def __len__(self):return len(self._callbacks)
1
2
1
12
0
38
39
38
self
[]
Returns
{"Return": 1}
1
2
1
["len"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3987994_yoshiko2_av_data_capture.number_parser_py.get_number", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69765524_openshift_elliott.elliottlib.model_py.ListModel.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesi...
The function (__len__) defined within the public class called Callback.The function start at line 38 and ends at 39. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called insid...
Sema4AI_actions
Callback
public
0
0
__call__
def __call__(self, *args, **kwargs):if self._reversed:iter_in = reversed(self._callbacks)else:iter_in = self._callbacksfor c in iter_in:try:c(*args, **kwargs)except Exception:logger.exception(f"Error calling: {c}.")if self.raise_exceptions:raise
5
12
3
62
0
41
52
41
self,*args,**kwargs
[]
None
{"Assign": 2, "Expr": 2, "For": 1, "If": 2, "Try": 1}
3
12
3
["reversed", "c", "logger.exception"]
50
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p...
The function (__call__) defined within the public class called Callback.The function start at line 41 and ends at 52. It contains 12 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [41.0] and does not return any value. It declares 3.0 functions, It has 3.0 functions called i...
Sema4AI_actions
Null
public
0
0
__init__
def __init__(self, *args, **kwargs):return None
1
2
3
13
0
13
14
13
self,*args,**kwargs
[]
Returns
{"Return": 1}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called Null.The function start at line 13 and ends at 14. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [13.0], and this function return a value. It has 6243.0 functions calling this function which are [...
Sema4AI_actions
Null
public
0
0
__call__
def __call__(self, *args, **kwargs):return self
1
2
3
13
0
16
17
16
self,*args,**kwargs
[]
Returns
{"Return": 1}
0
2
0
[]
50
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3561509_collective_solgema_fullcalendar.Solgema.fullcalendar.browser.views_py.SolgemaFullcalendarEventJS.__call__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3598540_saltstack_salt_testing.salttesting.runtests_p...
The function (__call__) defined within the public class called Null.The function start at line 16 and ends at 17. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [16.0], and this function return a value. It has 50.0 functions calling this function which are ["_...
Sema4AI_actions
Null
public
0
0
__enter__
def __enter__(self, *args, **kwargs):return self
1
2
3
13
0
19
20
19
self,*args,**kwargs
[]
Returns
{"Return": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662468_esss_jobs_done10.tests.server.test_server_py.test_error_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__enter__", "_...
The function (__enter__) defined within the public class called Null.The function start at line 19 and ends at 20. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [19.0], and this function return a value. It has 4.0 functions calling this function which are ["_...
Sema4AI_actions
Null
public
0
0
__exit__
def __exit__(self, *args, **kwargs):return self
1
2
3
13
0
22
23
22
self,*args,**kwargs
[]
Returns
{"Return": 1}
0
2
0
[]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.furious.context.auto_context_py.AutoContext.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__exit__",...
The function (__exit__) defined within the public class called Null.The function start at line 22 and ends at 23. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [22.0], and this function return a value. It has 5.0 functions calling this function which are ["_....
Sema4AI_actions
Null
public
0
0
__getattr__
def __getattr__(self, mname):if len(mname) > 4 and mname[:2] == "__" and mname[-2:] == "__":# Don't pretend to implement special method names.raise AttributeError(mname)return self
4
4
2
39
0
25
29
25
self,mname
[]
Returns
{"If": 1, "Return": 1}
2
5
2
["len", "AttributeError"]
12
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3625043_uber_tchannel_python.tchannel.event_py.EventRegistrar.__getattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69528069_adrotog_pandasgui.pandasgui.datasets_py.__getattr__", "_.content.gdrive.MyDrive.Phd_...
The function (__getattr__) defined within the public class called Null.The function start at line 25 and ends at 29. It contains 4 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [25.0], and this function return a value. It declares 2.0 functions, It has 2.0 functions called...
Sema4AI_actions
Null
public
0
0
__setattr__
def __setattr__(self, name, value):return self
1
2
3
11
0
31
32
31
self,name,value
[]
Returns
{"Return": 1}
0
2
0
[]
30
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3670790_opencivicdata_pupa.pupa.scrape.base_py.BaseModel.__setattr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3676862_pecan_pecan.pecan.configuration_py.Config.__setattr__", "_.content.gdrive.MyDrive.Phd_Thes...
The function (__setattr__) defined within the public class called Null.The function start at line 31 and ends at 32. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [31.0], and this function return a value. It has 30.0 functions calling this function which are ...
Sema4AI_actions
Null
public
0
0
__delattr__
def __delattr__(self, name):return self
1
2
2
9
0
34
35
34
self,name
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (__delattr__) defined within the public class called Null.The function start at line 34 and ends at 35. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [34.0], and this function return a value..
Sema4AI_actions
Null
public
0
0
__repr__
def __repr__(self):return "<Null>"
1
2
1
7
0
37
38
37
self
[]
Returns
{"Return": 1}
0
2
0
[]
54
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3581153_zetaops_pyoko.pyoko.listnode_py.ListNode.__repr__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3585282_geier_pycarddav.pycarddav.model_py.VCard.serialize", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Cre...
The function (__repr__) defined within the public class called Null.The function start at line 37 and ends at 38. 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 54.0 functions calling this function which are ["_.co...
Sema4AI_actions
Null
public
0
0
__str__
def __str__(self):return "Null"
1
2
1
7
0
40
41
40
self
[]
Returns
{"Return": 1}
0
2
0
[]
83
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.evm_cfg_py.EVMBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3675814_usyd_blockchain_vandal.src.tac_cfg_py.TACBasicBlock.__str__", "_.content.gdrive.MyDrive.Phd...
The function (__str__) defined within the public class called Null.The function start at line 40 and ends at 41. 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 83.0 functions calling this function which are ["_.con...
Sema4AI_actions
Null
public
0
0
__len__
def __len__(self):return 0
1
2
1
7
0
43
44
43
self
[]
Returns
{"Return": 1}
0
2
0
[]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3987994_yoshiko2_av_data_capture.number_parser_py.get_number", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69765524_openshift_elliott.elliottlib.model_py.ListModel.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesi...
The function (__len__) defined within the public class called Null.The function start at line 43 and ends at 44. 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 3.0 functions calling this function which are ["_.cont...
Sema4AI_actions
Null
public
0
0
__getitem__
def __getitem__(self, *args, **kwargs):return self
1
2
3
13
0
46
47
46
self,*args,**kwargs
[]
Returns
{"Return": 1}
0
2
0
[]
33
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.devices_py.DeviceList.__getitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3535398_idsia_brainstorm.brainstorm.structure.buffer_views_py.BufferView.__getitem__", "_.content.g...
The function (__getitem__) defined within the public class called Null.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 has 33.0 functions calling this function which are ...
Sema4AI_actions
Null
public
0
0
__setitem__
def __setitem__(self, *args, **kwargs):pass
1
2
3
12
0
49
50
49
self,*args,**kwargs
[]
None
{}
0
2
0
[]
32
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.devices_py.DeviceList.__setitem__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544475_chromium_web_page_replay.third_party.dns.namedict_py.NameDict.__setitem__", "_.content.gdri...
The function (__setitem__) defined within the public class called Null.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 does not return any value. It has 32.0 functions calling this function which are ["_....
Sema4AI_actions
Null
public
0
0
write
def write(self, *args, **kwargs):pass
1
2
3
12
0
52
53
52
self,*args,**kwargs
[]
None
{}
0
2
0
[]
120
["_.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.3511986_dart_archive_pub_dartlang.third_party.cherrypy.process.plugins_py.PIDFile.start", "_.content.gdrive.My...
The function (write) defined within the public class called Null.The function start at line 52 and ends at 53. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [52.0] and does not return any value. It has 120.0 functions calling this function which are ["_.conte...
Sema4AI_actions
Null
public
0
0
__nonzero__
def __nonzero__(self):return 0
1
2
1
7
0
55
56
55
self
[]
Returns
{"Return": 1}
0
2
0
[]
0
[]
The function (__nonzero__) defined within the public class called Null.The function start at line 55 and ends at 56. 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..
Sema4AI_actions
Null
public
0
0
__iter__
def __iter__(self):return iter(())
1
2
1
11
0
58
59
58
self
[]
Returns
{"Return": 1}
1
2
1
["iter"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3708218_marshallward_f90nml.f90nml.namelist_py.Namelist.__iter__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3720174_mozilla_bleach.bleach.html5lib_shim_py.BleachHTMLTokenizer.__iter__", "_.content.gdrive.MyDriv...
The function (__iter__) defined within the public class called Null.The function start at line 58 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called inside w...
Sema4AI_actions
CustomHandler
public
0
1
__init__
def __init__(self, level=logging.DEBUG):from . import callbacksuper().__init__(level)self.on_record = callback.Callback()
1
4
2
32
0
6
10
6
self,level
[]
None
{"Assign": 1, "Expr": 1}
3
5
3
["__init__", "super", "callback.Callback"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called CustomHandler, that inherit another class.The function start at line 6 and ends at 10. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [6.0] and does not return any value. It declares 3.0 functions,...
Sema4AI_actions
CustomHandler
public
0
1
emit
def emit(self, record):# Define the behavior to handle log records hereself.on_record(record)
1
2
2
13
0
12
14
12
self,record
[]
None
{"Expr": 1}
1
3
1
["self.on_record"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687109_tuhiproject_tuhi.tools.kete_py.TuhiKeteShellLogHandler.emit", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3715200_praekeltfoundation_junebug.junebug.command_line_py.PythonExceptionFilteringLoggingObserver....
The function (emit) defined within the public class called CustomHandler, that inherit another class.The function start at line 12 and ends at 14. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [12.0] and does not return any value. It declare 1.0 function, It ...
Sema4AI_actions
public
public
0
0
add_handler_callback
def add_handler_callback(logger, on_log_emit, level=None):"""Utility to add a handler in a context and remove it afterwards."""custom_handler = CustomHandler(level if level is not None else logging.DEBUG)with custom_handler.on_record.register(on_log_emit):initial_level = Noneif level is not None:initial_level = logger....
5
14
3
86
2
18
34
18
logger,on_log_emit,level
['initial_level', 'custom_handler']
None
{"Assign": 3, "Expr": 6, "If": 2, "Try": 1, "With": 1}
6
17
6
["CustomHandler", "custom_handler.on_record.register", "logger.setLevel", "logger.addHandler", "logger.removeHandler", "logger.setLevel"]
0
[]
The function (add_handler_callback) defined within the public class called public.The function start at line 18 and ends at 34. It contains 14 lines of code and it has a cyclomatic complexity of 5. It takes 3 parameters, represented as [18.0] and does not return any value. It declares 6.0 functions, and It has 6.0 fun...
Sema4AI_actions
FormatterNoColor
public
0
1
format
def format(self, record):message = super().format(record)return self.strip_colors_regex.sub("", message)
1
3
2
28
0
12
14
12
self,record
[]
Returns
{"Assign": 1, "Return": 1}
3
3
3
["format", "super", "self.strip_colors_regex.sub"]
8,362
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.BaseCollector_py.BaseCollector.get_SDRS_cluster", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.BaseCollector_py.BaseCollector.get_alertdefinition", "_.con...
The function (format) defined within the public class called FormatterNoColor, that inherit another class.The function start at line 12 and ends at 14. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [12.0], and this function return a value. It declares 3.0 fun...
Sema4AI_actions
FormatterStdout
public
0
1
__init__
def __init__(self, *args, **kwargs):super().__init__(*args, **kwargs)from uvicorn.logging import AccessFormatterself._access_formatter = AccessFormatter()
1
4
3
36
0
18
22
18
self,*args,**kwargs
[]
None
{"Assign": 1, "Expr": 1}
3
5
3
["__init__", "super", "AccessFormatter"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called FormatterStdout, that inherit another class.The function start at line 18 and ends at 22. It contains 4 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [18.0] and does not return any value. It declares 3.0 functi...
Sema4AI_actions
FormatterNoColor
public
0
1
format
def format(self, record):if record.name.startswith("uvicorn") and len(record.args) == 5:(client_addr,method,full_path,http_version,status_code,) = record.argstimestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")status_code = self._access_formatter.get_status_code(int(status_code))return (colored(f"{timestamp}: ", at...
3
17
2
104
0
24
42
24
self,record
[]
Returns
{"Assign": 1, "Return": 1}
3
3
3
["format", "super", "self.strip_colors_regex.sub"]
8,362
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.BaseCollector_py.BaseCollector.get_SDRS_cluster", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.BaseCollector_py.BaseCollector.get_alertdefinition", "_.con...
The function (format) defined within the public class called FormatterNoColor, that inherit another class.The function start at line 24 and ends at 42. It contains 17 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [24.0], and this function return a value. It declares 3.0 fu...
Sema4AI_actions
UvicornLogFilter
public
0
1
filter
def filter(self, record):# Log only Uvicorn Access messagesif record.levelno > logging.INFO:accept = Trueelse:accept = not (record.name.startswith("uvicorn") and len(record.args) != 5)return accept
3
6
2
45
0
46
52
46
self,record
[]
Returns
{"Assign": 2, "If": 1, "Return": 1}
2
7
2
["record.name.startswith", "len"]
939
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tools.Vrops_py.Vrops.get_resources", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.multidict._multidict_py_py._HtKeys.iter_entries", "_.content.gdrive.MyDrive...
The function (filter) defined within the public class called UvicornLogFilter, that inherit another class.The function start at line 46 and ends at 52. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [46.0], and this function return a value. It declares 2.0 fun...
Sema4AI_actions
UvicornLogFilter
public
0
1
filter
def filter(self, record):if record.name == "uvicorn.access":# Hide logging for oauth2 related urls.if len(record.args) == 5:if record.args[2].startswith("/oauth2/login"):args = list(record.args)args[2] = "/oauth2/login/?..."record.args = tuple(args)elif record.args[2].startswith("/sema4ai/oauth2"):args = list(record.ar...
5
13
2
98
0
56
69
56
self,record
[]
Returns
{"Assign": 2, "If": 1, "Return": 1}
2
7
2
["record.name.startswith", "len"]
939
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tools.Vrops_py.Vrops.get_resources", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3495544_aio_libs_multidict.multidict._multidict_py_py._HtKeys.iter_entries", "_.content.gdrive.MyDrive...
The function (filter) defined within the public class called UvicornLogFilter, that inherit another class.The function start at line 56 and ends at 69. It contains 13 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [56.0], and this function return a value. It declares 2.0 fu...
Sema4AI_actions
public
public
0
0
_stream_reader
def _stream_reader(stream, on_output):try:for line in iter(stream.readline, b""):if not line:breaktry:on_output(line)except Exception as e:log.error("Error reporting output line: %s", e)except Exception as e:log.error("Error reading stream: %s", e)
5
11
2
59
0
28
38
28
stream,on_output
[]
None
{"Expr": 3, "For": 1, "If": 1, "Try": 2}
4
11
4
["iter", "on_output", "log.error", "log.error"]
0
[]
The function (_stream_reader) defined within the public class called public.The function start at line 28 and ends at 38. It contains 11 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [28.0] and does not return any value. It declares 4.0 functions, and It has 4.0 functions...
Sema4AI_actions
public
public
0
0
_start_reader_threads
def _start_reader_threads(process, on_stdout, on_stderr):threads = []if on_stdout is not None:threads.append(threading.Thread(target=_stream_reader,args=(process.stdout, on_stdout),name="stream_reader_stdout",))if on_stderr is not None:threads.append(threading.Thread(target=_stream_reader,args=(process.stderr, on_stder...
4
20
3
91
1
41
62
41
process,on_stdout,on_stderr
['threads']
None
{"Assign": 1, "Expr": 3, "For": 1, "If": 2}
5
22
5
["threads.append", "threading.Thread", "threads.append", "threading.Thread", "t.start"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.process_py.Process.start", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4ai.common.process_py.Pro...
The function (_start_reader_threads) defined within the public class called public.The function start at line 41 and ends at 62. It contains 20 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [41.0] and does not return any value. It declares 5.0 functions, It has 5.0 functio...
Sema4AI_actions
Process
public
0
0
__init__
def __init__(self,args: List[str],cwd: Optional[PathLike] = None,env: Optional[Dict[str, str]] = None,):self._args = argsself._uid = next(self._UID)self._cwd = cwd or Path.cwd()self._env = {**os.environ, **(env or {})}self._proc: Optional[subprocess.Popen] = Noneself.on_stderr = Callback()self.on_stdout = Callback()
3
13
4
106
0
68
80
68
self,args,cwd,env
[]
None
{"AnnAssign": 1, "Assign": 6}
4
13
4
["next", "Path.cwd", "Callback", "Callback"]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called Process.The function start at line 68 and ends at 80. It contains 13 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [68.0] and does not return any value. It declares 4.0 functions, It has 4.0 functions called in...
Sema4AI_actions
Process
public
0
0
is_alive
def is_alive(self):if self._proc is None:raise RuntimeError("Process is still None (start() not called before is_alive).")return is_process_alive(self._proc.pid)
2
6
1
26
0
82
88
82
self
[]
Returns
{"If": 1, "Return": 1}
2
7
2
["RuntimeError", "is_process_alive"]
0
[]
The function (is_alive) defined within the public class called Process.The function start at line 82 and ends at 88. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions call...
Sema4AI_actions
Process
public
0
0
returncode
def returncode(self):if self._proc is None:raise RuntimeError("Process is still None (start() not called before returncode).")return self._proc.poll()
2
6
1
25
0
91
96
91
self
[]
Returns
{"If": 1, "Return": 1}
2
6
2
["RuntimeError", "self._proc.poll"]
0
[]
The function (returncode) defined within the public class called Process.The function start at line 91 and ends at 96. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters, and this function return a value. It declares 2.0 functions, and It has 2.0 functions ca...
Sema4AI_actions
Process
public
0
0
join
def join(self):if self._proc is None:raise RuntimeError("Process is still None (start() not called before join).")self._proc.wait()
2
6
1
24
0
98
103
98
self
[]
None
{"Expr": 1, "If": 1}
2
6
2
["RuntimeError", "self._proc.wait"]
6,259
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tests.TestCollectors_py.TestCollectors.test_collector_metrics", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.tools.Vrops_py.Vrops.get_resources", "_.conte...
The function (join) defined within the public class called Process.The function start at line 98 and ends at 103. It contains 6 lines of code and it has a cyclomatic complexity of 2. The function does not take any parameters and does not return any value. It declares 2.0 functions, It has 2.0 functions called inside wh...
Sema4AI_actions
Process
public
0
0
start
def start(self, read_stderr: bool = True, read_stdout: bool = True, **kwargs) -> None:new_kwargs = build_subprocess_kwargs(self._cwd, self._env, stdout=subprocess.PIPE, stderr=subprocess.PIPE)new_kwargs.update(kwargs)log.debug("Subprocess start [args=%s,cwd=%s,uid=%d]", self._args, self._cwd, self._uid)proc = self._pro...
3
19
4
131
0
105
124
105
self,read_stderr,read_stdout,**kwargs
[]
None
{"Assign": 6, "Expr": 4, "If": 2}
6
20
6
["build_subprocess_kwargs", "new_kwargs.update", "log.debug", "_popen_raise", "log.debug", "_start_reader_threads"]
136
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_py.BusMethodTests.test_block", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3511986_dart_archive_pub_dartlang.third_party.cherrypy.test.test_bus_...
The function (start) defined within the public class called Process.The function start at line 105 and ends at 124. It contains 19 lines of code and it has a cyclomatic complexity of 3. It takes 4 parameters, represented as [105.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called in...
Sema4AI_actions
Process
public
0
0
_on_stderr
def _on_stderr(self, line):if len(self.on_stderr) > 0:self.on_stderr(line.decode("utf-8", "replace"))
2
3
2
30
0
126
128
126
self,line
[]
None
{"Expr": 1, "If": 1}
3
3
3
["len", "self.on_stderr", "line.decode"]
0
[]
The function (_on_stderr) defined within the public class called Process.The function start at line 126 and ends at 128. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [126.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions ...
Sema4AI_actions
Process
public
0
0
_on_stdout
def _on_stdout(self, line):if len(self.on_stdout) > 0:self.on_stdout(line.decode("utf-8", "replace"))
2
3
2
30
0
130
132
130
self,line
[]
None
{"Expr": 1, "If": 1}
3
3
3
["len", "self.on_stdout", "line.decode"]
0
[]
The function (_on_stdout) defined within the public class called Process.The function start at line 130 and ends at 132. It contains 3 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [130.0] and does not return any value. It declares 3.0 functions, and It has 3.0 functions ...
Sema4AI_actions
Process
public
0
0
stop
def stop(self) -> None:if not self._proc:returnif self._proc.poll() is not None:returnif not self.is_alive():returnlog.debug("Subprocess kill [pid=%s,uid=%d]", self._proc.pid, self._uid)kill_process_and_subprocesses(self._proc.pid)
4
9
1
60
0
134
143
134
self
[]
None
{"Expr": 2, "If": 3, "Return": 3}
4
10
4
["self._proc.poll", "self.is_alive", "log.debug", "kill_process_and_subprocesses"]
35
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3392496_unipitechnology_evok.evok.evok_py.main", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3595150_twisted_txaws.txaws.reactor_py.get_exitcode_reactor", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Outp...
The function (stop) defined within the public class called Process.The function start at line 134 and ends at 143. It contains 9 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 inside w...
Sema4AI_actions
Process
public
0
0
pid
def pid(self):return self._proc.pid
1
2
1
11
0
146
147
146
self
[]
Returns
{"Return": 1}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3653784_wrobell_geotiler.geotiler.provider_py.providers"]
The function (pid) defined within the public class called Process.The function start at line 146 and ends at 147. 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 1.0 function calling this function which is ["_.conte...
Sema4AI_actions
public
public
0
0
build_subprocess_kwargs
def build_subprocess_kwargs(cwd, env, **kwargs) -> dict:startupinfo = Noneif sys.platform == "win32":# We don't want to show the shell on windows!startupinfo = subprocess.STARTUPINFO()startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOWstartupinfo.wShowWindow = subprocess.SW_HIDEstartupinfo = startupinfoif cwd:kwargs...
4
13
3
72
1
150
164
150
cwd,env,**kwargs
['startupinfo']
dict
{"Assign": 7, "AugAssign": 1, "If": 3, "Return": 1}
1
15
1
["subprocess.STARTUPINFO"]
6
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_process_pool_py.ProcessHandle.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.act...
The function (build_subprocess_kwargs) defined within the public class called public.The function start at line 150 and ends at 164. It contains 13 lines of code and it has a cyclomatic complexity of 4. It takes 3 parameters, represented as [150.0] and does not return any value. It declare 1.0 function, It has 1.0 func...
Sema4AI_actions
public
public
0
0
build_python_launch_env
def build_python_launch_env(new_env_vars: dict[str, str]) -> dict[str, str]:"""Args:new_env_vars: If empty this means that this is an unmanaged env. In thiscase the environment used will be the same one used to run theaction server itself."""if sys.platform == "win32":env = {}for k, v in os.environ.items():env[k.upper(...
4
15
1
111
1
167
197
167
new_env_vars
['env']
dict[str, str]
{"Assign": 5, "Expr": 5, "For": 1, "If": 2, "Return": 1}
7
31
7
["os.environ.items", "k.upper", "dict", "env.pop", "env.pop", "env.pop", "env.update"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_import_py.import_action_package", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_ser...
The function (build_python_launch_env) defined within the public class called public.The function start at line 167 and ends at 197. It contains 15 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 7.0 functions, It has 7.0 functi...
Sema4AI_actions
public
public
0
0
_popen
def _popen(cmdline, **kwargs):try:popen = subprocess.Popen(cmdline, **kwargs)# Not sure why, but (just when running in VSCode) something as:# launching sys.executable actually got stuck unless a \n was written# (even if stdin was closed it wasn't enough).# -- note: this may be particular to my machine (fabioz), but it#...
2
8
2
50
1
200
212
200
cmdline,**kwargs
['popen']
Returns
{"Assign": 1, "Expr": 2, "Return": 2, "Try": 1}
4
13
4
["subprocess.Popen", "_stdin_write", "log.exception", "join"]
21
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662260_ghostofgoes_getmac.getmac.getmac_py.ArpExe.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662260_ghostofgoes_getmac.getmac.getmac_py.ArpFreebsd.get", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creati...
The function (_popen) defined within the public class called public.The function start at line 200 and ends at 212. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [200.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions called...
Sema4AI_actions
public
public
0
0
_popen_raise
def _popen_raise(cmdline, **kwargs):try:popen = subprocess.Popen(cmdline, **kwargs)# Not sure why, but (just when running in VSCode) something as:# launching sys.executable actually got stuck unless a \n was written# (even if stdin was closed it wasn't enough).# -- note: this may be particular to my machine (fabioz), b...
2
8
2
49
1
215
227
215
cmdline,**kwargs
['popen']
Returns
{"Assign": 1, "Expr": 2, "Return": 1, "Try": 1}
4
13
4
["subprocess.Popen", "_stdin_write", "log.exception", "join"]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.process_py.Process.start", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server....
The function (_popen_raise) defined within the public class called public.The function start at line 215 and ends at 227. It contains 8 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [215.0], and this function return a value. It declares 4.0 functions, It has 4.0 functions ...
Sema4AI_actions
public
public
0
0
_stdin_write
def _stdin_write(process, input):if process.stdin is not None:if input:try:process.stdin.write(input)except BrokenPipeError:pass# communicate() must ignore broken pipe errors.except OSError as exc:if exc.errno == errno.EINVAL:# bpo-19612, bpo-30418: On Windows, stdin.write() fails# with EINVAL if the child process exit...
9
21
2
81
0
230
254
230
process,input
[]
None
{"Expr": 2, "If": 4, "Try": 2}
2
25
2
["process.stdin.write", "process.stdin.close"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.process_py._popen", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_u...
The function (_stdin_write) defined within the public class called public.The function start at line 230 and ends at 254. It contains 21 lines of code and it has a cyclomatic complexity of 9. It takes 2 parameters, represented as [230.0] and does not return any value. It declares 2.0 functions, It has 2.0 functions cal...
Sema4AI_actions
public
public
0
0
_call
def _call(cmdline, **kwargs):try:subprocess.check_call(cmdline, **kwargs)except Exception:log.exception("Error running: %s", (" ".join(cmdline)))return None
2
6
2
39
0
257
262
257
cmdline,**kwargs
[]
Returns
{"Expr": 2, "Return": 1, "Try": 1}
3
6
3
["subprocess.check_call", "log.exception", "join"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.69765524_openshift_elliott.tests.test_errata_async_py.TestAsyncErrataAPI.test_get_cve_package_exclusions"]
The function (_call) defined within the public class called public.The function start at line 257 and ends at 262. It contains 6 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [257.0], and this function return a value. It declares 3.0 functions, It has 3.0 functions called ...
Sema4AI_actions
IProgressReporter
public
1
1
cancelled
def cancelled(self) -> bool:pass
1
2
1
8
0
267
268
267
self
[]
bool
{}
0
2
0
[]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.94638225_rozari0_NezukoBot.nezuko.core.tasks_py.rm_task"]
The function (cancelled) defined within the public class called IProgressReporter, implement an interface, and it inherit another class.The function start at line 267 and ends at 268. 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 v...
Sema4AI_actions
IProgressReporter
public
1
1
set_additional_info
def set_additional_info(self, additional_info: str) -> None:"""The progress reporter shows the title and elapsed time automatically.With this API it's possible to add additional info for the user to see."""
1
1
2
12
0
270
275
270
self,additional_info
[]
None
{"Expr": 1}
0
6
0
[]
0
[]
The function (set_additional_info) defined within the public class called IProgressReporter, implement an interface, and it inherit another class.The function start at line 270 and ends at 275. It contains 1 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [270.0] and does no...
Sema4AI_actions
public
public
0
0
check_output_interactive.stream_reader
def stream_reader(stream, callback, contents_list: List[bytes]):for line in iter(stream.readline, b""):if not line:breakcontents_list.append(line)callback(line)
3
6
3
42
0
316
321
316
null
[]
None
null
0
0
0
null
0
null
The function (check_output_interactive.stream_reader) defined within the public class called public.The function start at line 316 and ends at 321. It contains 6 lines of code and it has a cyclomatic complexity of 3. It takes 3 parameters, represented as [316.0] and does not return any value..
Sema4AI_actions
public
public
0
0
check_output_interactive.check_progress_cancelled
def check_progress_cancelled(process, progress_reporter: IProgressReporter):try:while process.poll() is None:try:process.wait(1)except BaseException:if progress_reporter.cancelled:retcode = process.poll()if retcode is None:msg_str = f"Progress was cancelled (RCC pid: {process.pid} was killed).\n"msg = msg_str.encode("u...
6
18
2
99
0
323
340
323
null
[]
None
null
0
0
0
null
0
null
The function (check_output_interactive.check_progress_cancelled) defined within the public class called public.The function start at line 323 and ends at 340. It contains 18 lines of code and it has a cyclomatic complexity of 6. It takes 2 parameters, represented as [323.0] and does not return any value..
Sema4AI_actions
public
public
0
0
check_output_interactive
def check_output_interactive(*popenargs,timeout=None,progress_reporter: Optional[IProgressReporter] = None,on_stderr=lambda *args, **kwargs: None,on_stdout=lambda *args, **kwargs: None,**kwargs,) -> bytes:"""This has the same API as subprocess.check_output, but allows us to work withthe contents being generated by the ...
11
64
8
360
5
278
396
278
*popenargs,timeout,progress_reporter,on_stderr,on_stdout,**kwargs
['threads', 'retcode', 't', 'msg_str', 'msg']
bytes
{"AnnAssign": 3, "Assign": 10, "Expr": 15, "For": 3, "If": 8, "Return": 1, "Try": 5, "While": 1, "With": 1}
33
119
33
["kwargs.get", "AssertionError", "kwargs.get", "AssertionError", "iter", "contents_list.append", "callback", "process.poll", "process.wait", "process.poll", "msg_str.encode", "log.info", "stderr_contents.insert", "stderr_contents.append", "on_stderr", "kill_process_and_subprocesses", "log.exception", "_popen_raise", "t...
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._rcc_py.Rcc._run_rcc"]
The function (check_output_interactive) defined within the public class called public.The function start at line 278 and ends at 396. It contains 64 lines of code and it has a cyclomatic complexity of 11. It takes 8 parameters, represented as [278.0] and does not return any value. It declares 33.0 functions, It has 33....
Sema4AI_actions
public
public
0
0
run_in_thread.new_target
def new_target():try:result = target()except BaseException as e:fut.set_exception(e)else:fut.set_result(result)
2
7
0
30
0
17
23
17
null
[]
None
null
0
0
0
null
0
null
The function (run_in_thread.new_target) defined within the public class called public.The function start at line 17 and ends at 23. 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..
Sema4AI_actions
public
public
0
0
run_in_thread
def run_in_thread(target: Callable[[], T], **kwargs) -> futures.Future[T]:"""Runs a given target in a thread returning a Future which can be used totrack its result."""fut: futures.Future[T] = futures.Future()if "name" not in kwargs:kwargs["name"] = f"run_in_thread:{target}"def new_target():try:result = target()except ...
2
9
2
75
2
8
29
8
target,**kwargs
['t', 'result']
futures.Future[T]
{"AnnAssign": 1, "Assign": 3, "Expr": 4, "If": 1, "Return": 1, "Try": 1}
6
22
6
["futures.Future", "target", "fut.set_exception", "fut.set_result", "threading.Thread", "t.start"]
10
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._actions_process_pool_py.ProcessHandle.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.act...
The function (run_in_thread) defined within the public class called public.The function start at line 8 and ends at 29. It contains 9 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [8.0] and does not return any value. It declares 6.0 functions, It has 6.0 functions called i...
Sema4AI_actions
public
public
0
0
run_in_thread_asyncio
def run_in_thread_asyncio(target: Callable[[], T],**kwargs,) -> asyncio.futures.Future[T]:"""Runs a given target in a thread returning an asyncio Future which can beawaited in an asyncio loop."""from asyncio.futures import wrap_futurefut = run_in_thread(target, **kwargs)return wrap_future(fut)
1
7
2
47
1
32
43
32
target,**kwargs
['fut']
asyncio.futures.Future[T]
{"Assign": 1, "Expr": 1, "Return": 1}
2
12
2
["run_in_thread", "wrap_future"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._api_oauth2_py.oauth2_status"]
The function (run_in_thread_asyncio) defined within the public class called public.The function start at line 32 and ends at 43. It contains 7 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [32.0] and does not return any value. It declares 2.0 functions, It has 2.0 function...
Sema4AI_actions
public
public
0
0
check_valid_mutex_name
def check_valid_mutex_name(mutex_name):# To be windows/linux compatible we can't use non-valid filesystem names# (as on linux it's a file-based lock).regexp = re.compile(r'[\*\?"<>|/\\:]')result = regexp.findall(mutex_name)if result is not None and len(result) > 0:raise AssertionError("Mutex name is invalid: %s" % (mut...
3
5
1
45
2
42
49
42
mutex_name
['regexp', 'result']
None
{"Assign": 2, "If": 1}
4
8
4
["re.compile", "regexp.findall", "len", "AssertionError"]
0
[]
The function (check_valid_mutex_name) defined within the public class called public.The function start at line 42 and ends at 49. 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 4.0 functions, and It has 4.0 funct...
Sema4AI_actions
public
public
0
0
get_tid
def get_tid():return threading.get_ident()# @UndefinedVariable
1
2
0
10
0
58
59
58
[]
Returns
{"Return": 1}
1
2
1
["threading.get_ident"]
3
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._robo_utils.system_mutex_py._verify_prev_acquired_in_thread", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.src.sema4a...
The function (get_tid) defined within the public class called public.The function start at line 58 and ends at 59. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters, and this function return a value. It declare 1.0 function, It has 1.0 function called inside ...
Sema4AI_actions
public
public
0
0
_mark_prev_acquired_in_thread
def _mark_prev_acquired_in_thread(system_mutex):with _lock:_mutex_name_to_info[system_mutex.mutex_name] = system_mutex
1
3
1
16
0
62
64
62
system_mutex
[]
None
{"Assign": 1, "With": 1}
0
3
0
[]
0
[]
The function (_mark_prev_acquired_in_thread) 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. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
_verify_prev_acquired_in_thread
def _verify_prev_acquired_in_thread(mutex_name):with _lock:system_mutex = _mutex_name_to_info.get(mutex_name)if (system_mutex is not Noneand system_mutex.get_mutex_aquired()and not system_mutex.disposedand system_mutex.thread_id == get_tid()):raise RuntimeError("Error: this thread has already acquired a SystemMutex(%s)...
5
13
1
53
1
67
79
67
mutex_name
['system_mutex']
None
{"Assign": 1, "If": 1, "With": 1}
4
13
4
["_mutex_name_to_info.get", "system_mutex.get_mutex_aquired", "get_tid", "RuntimeError"]
0
[]
The function (_verify_prev_acquired_in_thread) defined within the public class called public.The function start at line 67 and ends at 79. It contains 13 lines of code and it has a cyclomatic complexity of 5. The function does not take any parameters and does not return any value. It declares 4.0 functions, and It has...
Sema4AI_actions
public
public
0
0
_collect_mutex_allocation_msg
def _collect_mutex_allocation_msg(mutex_name):try:# Note: the first line of the file used as a mutex MUST always have the# format: PID: <pid>\n# (other tools may rely on that to show information to the user).write_contents = []try:write_contents.append(f"PID: {os.getpid()}")except Exception:write_contents.append("PID: ...
4
19
1
104
2
82
107
82
mutex_name
['write_contents', 's']
Returns
{"Assign": 2, "Expr": 7, "Return": 3, "Try": 3}
13
26
13
["write_contents.append", "os.getpid", "write_contents.append", "write_contents.append", "write_contents.append", "io.StringIO", "traceback.print_stack", "sys._getframe", "write_contents.append", "write_contents.append", "s.getvalue", "join", "os.getpid"]
0
[]
The function (_collect_mutex_allocation_msg) defined within the public class called public.The function start at line 82 and ends at 107. It contains 19 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 13.0 functions, and It...
Sema4AI_actions
public
public
0
0
__init__.release_mutex
def release_mutex(*args, **kwargs):# Note: can't use self here!if not getattr(release_mutex, "called", False):release_mutex.called = Truetry:os.close(handle)except Exception:traceback.print_exc()try:# Removing is optional as we'll try to remove on startup anyways (but# let's do it to keep the filesystem cleaner).os.unl...
4
11
2
53
0
155
168
155
null
[]
None
null
0
0
0
null
0
null
The function (__init__.release_mutex) defined within the public class called public.The function start at line 155 and ends at 168. It contains 11 lines of code and it has a cyclomatic complexity of 4. It takes 2 parameters, represented as [155.0] and does not return any value..
Sema4AI_actions
_MutexHandle
protected
0
1
__init__
def __init__(self, mutex_name, check_reentrant=True, log_info=False, base_dir=None):""":param check_reentrant:Should only be False if this mutex is expected to be released ina different thread."""if base_dir is None:base_dir = tempfile.gettempdir()os.makedirs(base_dir, exist_ok=True)check_valid_mutex_name(mutex_name)se...
7
38
5
213
0
114
175
114
self,system_mutex,mutex_name
[]
None
{"Assign": 2}
0
3
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _MutexHandle, that inherit another class.The function start at line 114 and ends at 175. It contains 38 lines of code and it has a cyclomatic complexity of 7. It takes 5 parameters, represented as [114.0] and does not return any value. It has 6243.0 func...
Sema4AI_actions
public
public
0
0
disposed
def disposed(self):if not self._acquired:return Truerelease_mutex = self._release_mutexif release_mutex is NULL:return Trueif getattr(release_mutex, "called", False):return Truereturn False
4
9
1
39
0
178
186
178
null
[]
None
null
0
0
0
null
0
null
The function (disposed) defined within the public class called public.The function start at line 178 and ends at 186. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
get_mutex_aquired
def get_mutex_aquired(self):return self._acquired
1
2
1
9
0
188
189
188
null
[]
None
null
0
0
0
null
0
null
The function (get_mutex_aquired) defined within the public class called public.The function start at line 188 and ends at 189. 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..
Sema4AI_actions
public
public
0
0
release_mutex
def release_mutex(self):self._release_mutex()
1
2
1
10
0
191
192
191
null
[]
None
null
0
0
0
null
0
null
The function (release_mutex) defined within the public class called public.The function start at line 191 and ends at 192. 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..
Sema4AI_actions
public
public
0
0
__init__.release_mutex
def release_mutex(*args, **kwargs):# Note: can't use self here!if not getattr(release_mutex, "called", False):release_mutex.called = Truetry:handle.seek(0)handle.truncate()handle.write("Releasing lock\n")handle.flush()except Exception:traceback.print_exc()try:fcntl.flock(handle, fcntl.LOCK_UN)except Exception:traceback...
5
18
2
92
0
268
286
268
null
[]
None
null
0
0
0
null
0
null
The function (__init__.release_mutex) defined within the public class called public.The function start at line 268 and ends at 286. It contains 18 lines of code and it has a cyclomatic complexity of 5. It takes 2 parameters, represented as [268.0] and does not return any value..
Sema4AI_actions
_MutexHandle
protected
0
1
__init__
def __init__(self, mutex_name, check_reentrant=True, log_info=False, base_dir=None):""":param check_reentrant:Should only be False if this mutex is expected to be released ina different thread."""from .process import is_process_aliveif base_dir is None:base_dir = tempfile.gettempdir()os.makedirs(base_dir, exist_ok=True...
11
63
5
332
0
199
298
199
self,system_mutex,mutex_name
[]
None
{"Assign": 2}
0
3
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _MutexHandle, that inherit another class.The function start at line 199 and ends at 298. It contains 63 lines of code and it has a cyclomatic complexity of 11. It takes 5 parameters, represented as [199.0] and does not return any value. It has 6243.0 fun...
Sema4AI_actions
public
public
0
0
disposed
def disposed(self):if not self._acquired:return Truerelease_mutex = self._release_mutexif release_mutex is NULL:return Trueif getattr(release_mutex, "called", False):return Truereturn False
4
9
1
39
0
301
309
178
null
[]
None
null
0
0
0
null
0
null
The function (disposed) defined within the public class called public.The function start at line 301 and ends at 309. It contains 9 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
get_mutex_aquired
def get_mutex_aquired(self):return self._acquired
1
2
1
9
0
311
312
188
null
[]
None
null
0
0
0
null
0
null
The function (get_mutex_aquired) defined within the public class called public.The function start at line 311 and ends at 312. 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..
Sema4AI_actions
public
public
0
0
release_mutex
def release_mutex(self):self._release_mutex()
1
2
1
10
0
314
315
191
null
[]
None
null
0
0
0
null
0
null
The function (release_mutex) defined within the public class called public.The function start at line 314 and ends at 315. 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..
Sema4AI_actions
_MutexHandle
protected
0
1
__init__
def __init__(self, system_mutex, mutex_name):self._system_mutex = system_mutexself._mutex_name = mutex_name
1
3
3
19
0
319
321
319
self,system_mutex,mutex_name
[]
None
{"Assign": 2}
0
3
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the protected class called _MutexHandle, that inherit another class.The function start at line 319 and ends at 321. It contains 3 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [319.0] and does not return any value. It has 6243.0 funct...
Sema4AI_actions
_MutexHandle
protected
0
1
__enter__
def __enter__(self, *args, **kwargs):return self
1
2
3
13
0
324
325
324
self,*args,**kwargs
[]
Returns
{"Return": 1}
0
2
0
[]
4
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3662468_esss_jobs_done10.tests.server.test_server_py.test_error_handling", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__enter__", "_...
The function (__enter__) defined within the protected class called _MutexHandle, that inherit another class.The function start at line 324 and ends at 325. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [324.0], and this function return a value. It has 4.0 fun...
Sema4AI_actions
_MutexHandle
protected
0
1
__exit__
def __exit__(self, *args, **kwargs):self._system_mutex.release_mutex()
1
2
3
18
0
327
328
327
self,*args,**kwargs
[]
None
{"Expr": 1}
1
2
1
["self._system_mutex.release_mutex"]
5
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3544998_workiva_furious.furious.context.auto_context_py.AutoContext.__exit__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.3687355_datarobot_batch_scoring.datarobot_batch_scoring.writer_py.NewRunContext.__exit__",...
The function (__exit__) defined within the protected class called _MutexHandle, that inherit another class.The function start at line 327 and ends at 328. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 3 parameters, represented as [327.0] and does not return any value. It declare 1.0 func...
Sema4AI_actions
public
public
0
0
timed_acquire_mutex
def timed_acquire_mutex(mutex_name,timeout=20,sleep_time=0.15,check_reentrant=True,base_dir=None,raise_error_on_timeout=False,) -> ContextManager:"""Acquires the mutex given its name, a number of attempts and a time to sleep between each attempt.:throws RuntimeError if it was not possible to get the mutex in the given ...
7
40
6
145
5
332
391
332
mutex_name,timeout,sleep_time,check_reentrant,base_dir,raise_error_on_timeout
['finish_at', 'logged', 'last_attempt', 'will_retry_msg', 'mutex']
ContextManager
{"Assign": 7, "Expr": 3, "If": 5, "Return": 1, "While": 1}
8
60
8
["time.monotonic", "time.monotonic", "SystemMutex", "mutex.get_mutex_aquired", "log.info", "RuntimeError", "time.sleep", "_MutexHandle"]
7
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._rcc_py.Rcc._run_rcc", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_server_tests.robo_utils.test_...
The function (timed_acquire_mutex) defined within the public class called public.The function start at line 332 and ends at 391. It contains 40 lines of code and it has a cyclomatic complexity of 7. It takes 6 parameters, represented as [332.0] and does not return any value. It declares 8.0 functions, It has 8.0 functi...
Sema4AI_actions
public
public
0
0
generate_mutex_name
def generate_mutex_name(target_name, prefix=""):"""A mutex name must be a valid filesystem path, so, this generates a hashthat can be used in case the original name would have conflicts."""import hashlibif not isinstance(target_name, bytes):target_name = target_name.encode("utf-8")return prefix + (hashlib.sha224(target...
2
5
2
48
1
394
404
394
target_name,prefix
['target_name']
Returns
{"Assign": 1, "Expr": 1, "If": 1, "Return": 1}
4
11
4
["isinstance", "target_name.encode", "hexdigest", "hashlib.sha224"]
2
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.tests.action_server_tests.robo_utils.test_system_mutex_py.test_gen_mutex_name_from_path", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.common.tests.se...
The function (generate_mutex_name) defined within the public class called public.The function start at line 394 and ends at 404. It contains 5 lines of code and it has a cyclomatic complexity of 2. It takes 2 parameters, represented as [394.0], and this function return a value. It declares 4.0 functions, It has 4.0 fun...
Sema4AI_actions
public
public
0
0
handle_env_command
def handle_env_command(env_args: ArgumentsNamespace, rcc: "Rcc"):import typingenv_command = typing.cast(ArgumentsNamespaceEnv, env_args).env_commandif not env_command:log.critical("Command for env operation not specified.")return 1if env_command == "clean-tools-caches":log.info("Clearing tools caches, please wait...")r...
3
12
2
64
1
12
26
12
env_args,rcc
['env_command']
Returns
{"Assign": 1, "Expr": 4, "If": 2, "Return": 3}
5
15
5
["typing.cast", "log.critical", "log.info", "rcc.clean_tools_caches", "log.critical"]
1
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.95053458_Sema4AI_actions.action_server.src.sema4ai.action_server._cli_impl_py._main_retcode"]
The function (handle_env_command) defined within the public class called public.The function start at line 12 and ends at 26. It contains 12 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [12.0], and this function return a value. It declares 5.0 functions, It has 5.0 functi...
Sema4AI_actions
McpResponseHandler
public
0
0
__init__
def __init__(self):pass
1
2
1
6
0
36
37
36
self
[]
None
{}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called McpResponseHandler.The function start at line 36 and ends at 37. It contains 2 lines of code and it has a cyclomatic complexity of 1. The function does not take any parameters and does not return any value. It has 6243.0 functions calling this function whic...
Sema4AI_actions
McpResponseHandler
public
0
0
set_run_id
def set_run_id(self, run_id: str):pass
1
2
2
10
0
39
40
39
self,run_id
[]
None
{}
0
2
0
[]
0
[]
The function (set_run_id) defined within the public class called McpResponseHandler.The function start at line 39 and ends at 40. It contains 2 lines of code and it has a cyclomatic complexity of 1. It takes 2 parameters, represented as [39.0] and does not return any value..
Sema4AI_actions
McpResponseHandler
public
0
0
set_async_completion
def set_async_completion(self):pass
1
2
1
6
0
42
43
42
self
[]
None
{}
0
2
0
[]
0
[]
The function (set_async_completion) defined within the public class called McpResponseHandler.The function start at line 42 and ends at 43. 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..
Sema4AI_actions
public
public
0
0
__init__.get_headers_and_cookies
def get_headers_and_cookies() -> tuple[dict[str, str], dict[str, str]]:headers: dict[str, str] = {}cookies: dict[str, str] = {}try:request_context = self.server.request_contextexcept LookupError:return headers, cookiesif request_context:request = request_context.requestif request:headers = dict(request.headers)cookies ...
4
13
0
90
0
64
76
64
null
[]
None
null
0
0
0
null
0
null
The function (__init__.get_headers_and_cookies) defined within the public class called public.The function start at line 64 and ends at 76. It contains 13 lines of code and it has a cyclomatic complexity of 4. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
__init__.list_tools
async def list_tools() -> list[Tool]:return self._tools
1
2
0
13
0
79
80
79
null
[]
None
null
0
0
0
null
0
null
The function (__init__.list_tools) defined within the public class called public.The function start at line 79 and ends at 80. 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..
Sema4AI_actions
public
public
0
0
__init__.list_resources
async def list_resources() -> list[Resource]:return list(self._resources.values())
1
2
0
20
0
83
84
83
null
[]
None
null
0
0
0
null
0
null
The function (__init__.list_resources) 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..
Sema4AI_actions
public
public
0
0
__init__.list_resource_templates
async def list_resource_templates() -> list[ResourceTemplate]:return self._resource_templates
1
2
0
13
0
87
88
87
null
[]
None
null
0
0
0
null
0
null
The function (__init__.list_resource_templates) defined within the public class called public.The function start at line 87 and ends at 88. 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..
Sema4AI_actions
public
public
0
0
__init__.call_tool
async def call_tool(name: str,arguments: dict[str, Any],) -> list[TextContent | ImageContent | EmbeddedResource]:import jsontry:from sema4ai.action_server._actions_run import IInternalFuncAPIheaders, cookies = get_headers_and_cookies()action_info = self._tool_name_to_action_info[name]func: IInternalFuncAPI = action_inf...
3
23
2
144
0
91
115
91
null
[]
None
null
0
0
0
null
0
null
The function (__init__.call_tool) defined within the public class called public.The function start at line 91 and ends at 115. It contains 23 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [91.0] and does not return any value..
Sema4AI_actions
public
public
0
0
__init__.__init__.read_resource.gen
def gen() -> Iterable[ReadResourceContents]:try:mime_type = default_mime_typeif isinstance(result, (str, bytes)):if not mime_type:if isinstance(result, str):mime_type = "text/plain"else:mime_type = "application/octet-stream"yield ReadResourceContents(content=result, mime_type=mime_type)else:import jsonyield ReadResourc...
6
22
0
100
0
155
178
155
null
[]
None
null
0
0
0
null
0
null
The function (__init__.__init__.read_resource.gen) defined within the public class called public.The function start at line 155 and ends at 178. It contains 22 lines of code and it has a cyclomatic complexity of 6. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
__init__.read_resource
async def read_resource(uri: AnyUrl,):from typing import Iterabletry:params: dict[str, Any] = {}# First check if it matches any resource templates# If no template match, check if it's a direct resourceaction_info = self._resource_to_action_info.get(str(uri))if action_info:resource = self._resources.get(uri)default_mime...
7
37
1
172
0
118
186
118
null
[]
None
null
0
0
0
null
0
null
The function (__init__.read_resource) defined within the public class called public.The function start at line 118 and ends at 186. It contains 37 lines of code and it has a cyclomatic complexity of 7. The function does not take any parameters and does not return any value..
Sema4AI_actions
public
public
0
0
__init__.get_prompt
async def get_prompt(name: str,arguments: dict[str, Any] | None = None,) -> GetPromptResult:try:action_info = self._prompt_name_to_action_info[name]func = action_info.funcheaders, cookies = get_headers_and_cookies()result = await func(response_handler=McpResponseHandler(),inputs=arguments or {},headers=headers,cookies=...
3
25
2
121
0
189
220
189
null
[]
None
null
0
0
0
null
0
null
The function (__init__.get_prompt) defined within the public class called public.The function start at line 189 and ends at 220. It contains 25 lines of code and it has a cyclomatic complexity of 3. It takes 2 parameters, represented as [189.0] and does not return any value..
Sema4AI_actions
public
public
0
0
__init__.list_prompts
async def list_prompts() -> list[Prompt]:return self._prompts
1
2
0
13
0
223
224
223
null
[]
None
null
0
0
0
null
0
null
The function (__init__.list_prompts) defined within the public class called public.The function start at line 223 and ends at 224. 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..
Sema4AI_actions
McpResponseHandler
public
0
0
__init__
def __init__(self) -> None:from mcp.server import Serverfrom mcp.server.lowlevel.helper_types import ReadResourceContentsserver: Server = Server("Action Server")self.server = serverself._init_state()def get_headers_and_cookies() -> tuple[dict[str, str], dict[str, str]]:headers: dict[str, str] = {}cookies: dict[str, str...
1
21
1
106
0
56
224
56
self
[]
None
{}
0
2
0
[]
6,243
["_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.AlertCollector_py.AlertCollector.__init__", "_.content.gdrive.MyDrive.Phd_Thesis.Dataset_Creation.Output.Cloned_Repo_3.11269405_sapcc_vrops_exporter.collectors.ClusterAlertCollector_py.ClusterAlertCollec...
The function (__init__) defined within the public class called McpResponseHandler.The function start at line 56 and ends at 224. It contains 21 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 6243.0 functions calling this function wh...