MCPcopy Create free account
hub / github.com/Persper/code-analytics / build_call_graph_java

Function build_call_graph_java

persper/analytics/call_graph/java.py:355–371  ·  view source on GitHub ↗
(roots, G=None, env=None)

Source from the content-addressed store, hash-verified

353
354
355def build_call_graph_java(roots, G=None, env=None):
356 if G is None:
357 G = nx.DiGraph()
358
359 new_func = {}
360 fid_to_file = {}
361
362 # Initialize global environment
363 for root in roots:
364 env = prepare_env(root, env=env)
365
366 # Build call graph
367 for root in roots:
368 class_nodes = root.xpath('./srcml:class', namespaces=ns)
369 for class_node in class_nodes:
370 handle_class_node(class_node, G, new_func, fid_to_file, env)
371 return G, new_func, fid_to_file, env
372
373
374def update_call_graph_java(G, roots, modified_func, env=None):

Callers 1

update_call_graph_javaFunction · 0.70

Calls 2

prepare_envFunction · 0.70
handle_class_nodeFunction · 0.70

Tested by

no test coverage detected