Network Analysis in Python
This report presents the forensic synthetic code analysis of networkx/networkx, a Python project with 17,089 GitHub stars. SynthScan v2.0 examined 206,828 lines of code across 748 source files, recording 3481 pattern matches distributed across 17 syntactic categories. The overall adjusted score of 21.2 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 3481 distinct pattern matches across 17 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/conftest.py | 79 | def pytest_collection_modifyitems(config, items): | CODE |
| LOW | networkx/relabel.py | 232 | def convert_node_labels_to_integers( | CODE |
| LOW | networkx/readwrite/gexf.py | 710 | def alter_graph_mode_timeformat(self, start_or_end): | CODE |
| LOW | networkx/readwrite/multiline_adjlist.py | 39 | def generate_multiline_adjlist(G, delimiter=" "): | CODE |
| LOW | networkx/readwrite/json_graph/tests/test_adjacency.py | 61 | def test_input_data_is_not_modified_when_building_graph(self): | CODE |
| LOW | networkx/readwrite/json_graph/tests/test_adjacency.py | 69 | def test_adjacency_form_json_serialisable(self): | CODE |
| LOW | networkx/readwrite/json_graph/tests/test_node_link.py | 52 | def test_graph_with_tuple_nodes(self): | CODE |
| LOW | networkx/readwrite/json_graph/tests/test_cytoscape.py | 16 | def test_input_data_is_not_modified_when_building_graph(): | CODE |
| LOW | networkx/readwrite/tests/test_graph6.py | 40 | def test_read_equals_from_bytes(self): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_graph6.py | 84 | def test_large_complete_graph(self): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_graph6.py | 94 | def test_complete_bipartite_graph(self): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_graph6.py | 102 | def test_no_directed_or_multi_graphs(self, G): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_graph6.py | 152 | def test_large_complete_graph(self): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_graph6.py | 160 | def test_complete_bipartite_graph(self): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_graph6.py | 165 | def test_no_directed_or_multi_graphs(self, G): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 44 | def test_dynamic_graph_has_timeformat(time_attr, dyn_attr, tmp_path): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 64 | def test_dynamic_boolean_attvalue_is_lowercase(tmp_path): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 209 | def test_read_simple_directed_graphml(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 217 | def test_write_read_simple_directed_graphml(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 228 | def test_read_simple_undirected_graphml(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 237 | def test_read_attribute_graphml(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 248 | def test_directed_edge_in_undirected(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 265 | def test_undirected_edge_in_directed(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 342 | def test_serialize_ints_to_strings(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 352 | def test_write_with_node_attributes(self): | STRING |
| LOW | networkx/readwrite/tests/test_gexf.py | 536 | def test_multigraph_with_missing_attributes(self): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 552 | def test_missing_viz_attributes(self): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 634 | def test_round_trip_mixed_type_float_to_string(self): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 646 | def test_round_trip_mixed_type_int_to_string(self): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 658 | def test_type_promotion_integer_to_integer(self): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 673 | def test_type_promotion_float_to_float(self): | CODE |
| LOW | networkx/readwrite/tests/test_gexf.py | 688 | def test_meta_description_keywords_round_trip(self): | CODE |
| LOW | networkx/readwrite/tests/test_sparse6.py | 58 | def test_from_bytes_multigraph_graph(self): | CODE |
| LOW | networkx/readwrite/tests/test_sparse6.py | 118 | def test_very_large_empty_graph(self): | CODE |
| LOW | networkx/readwrite/tests/test_pajek.py | 130 | def test_quotes_and_backslashes_roundtrip(self): | CODE |
| LOW | networkx/readwrite/tests/test_gml.py | 59 | def test_parse_gml_cytoscape_bug(self): | STRING |
| LOW | networkx/readwrite/tests/test_gml.py | 233 | def test_tuple_label_quote_escape(self): | CODE |
| LOW | networkx/readwrite/tests/test_gml.py | 653 | def test_writing_graph_with_multi_element_property_list(self): | STRING |
| LOW | networkx/readwrite/tests/test_gml.py | 677 | def test_writing_graph_with_one_element_property_list(self): | STRING |
| LOW | networkx/readwrite/tests/test_gml.py | 697 | def test_reading_graph_with_list_property(self): | STRING |
| LOW | networkx/readwrite/tests/test_gml.py | 719 | def test_reading_graph_with_single_element_list_property(self): | STRING |
| LOW | networkx/readwrite/tests/test_gml.py | 741 | def test_stringize_empty_list_tuple(coll): | STRING |
| LOW | networkx/readwrite/tests/test_edgelist.py | 80 | def test_read_edgelist_no_data(data, extra_kwargs): | CODE |
| LOW | networkx/readwrite/tests/test_edgelist.py | 86 | def test_read_weighted_edgelist(): | CODE |
| LOW | networkx/readwrite/tests/test_edgelist.py | 104 | def test_read_edgelist_with_data(data, extra_kwargs, expected): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_edgelist.py | 117 | def test_parse_edgelist_no_data(example_graph): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_edgelist.py | 124 | def test_parse_edgelist_with_data_dict(example_graph): | CODE |
| LOW⚡ | networkx/readwrite/tests/test_edgelist.py | 133 | def test_parse_edgelist_with_data_list(example_graph): | CODE |
| LOW | networkx/readwrite/tests/test_edgelist.py | 293 | def test_edgelist_multidigraph(self, tmp_path): | CODE |
| LOW | networkx/readwrite/tests/test_edgelist.py | 304 | def test_edgelist_consistent_strip_handling(): | CODE |
| LOW | networkx/readwrite/tests/test_adjlist.py | 59 | def test_multiple_edges_undirected(self): | CODE |
| LOW | networkx/readwrite/tests/test_adjlist.py | 69 | def test_multiple_edges_directed(self): | CODE |
| LOW | networkx/readwrite/tests/test_adjlist.py | 83 | def test_multiple_edges_with_data(self): | CODE |
| LOW | networkx/readwrite/tests/test_adjlist.py | 209 | def test_adjlist_multidigraph(self, tmp_path): | STRING |
| LOW | networkx/readwrite/tests/test_adjlist.py | 243 | def test_parse_multiline_adjlist(self): | STRING |
| LOW⚡ | networkx/readwrite/tests/test_adjlist.py | 270 | def test_multiline_adjlist_graph(self, tmp_path): | STRING |
| LOW⚡ | networkx/readwrite/tests/test_adjlist.py | 280 | def test_multiline_adjlist_digraph(self, tmp_path): | STRING |
| LOW⚡ | networkx/readwrite/tests/test_adjlist.py | 290 | def test_multiline_adjlist_integers(self, tmp_path): | STRING |
| LOW⚡ | networkx/readwrite/tests/test_adjlist.py | 300 | def test_multiline_adjlist_multigraph(self, tmp_path): | STRING |
| LOW | networkx/readwrite/tests/test_adjlist.py | 312 | def test_multiline_adjlist_multidigraph(self, tmp_path): | STRING |
| 2031 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | networkx/algorithms/simple_paths.py | 539 | listB.push(length, path) | CODE |
| HIGH | networkx/algorithms/simple_paths.py | 559 | listB.push(root_length + length, path) | CODE |
| HIGH | networkx/algorithms/operators/tests/test_unary.py | 26 | nullcc = nx.complement(nx.complement(null)) | CODE |
| HIGH | networkx/algorithms/operators/tests/test_unary.py | 27 | assert nx.is_isomorphic(null, nullcc) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 20 | G = nx.tensor_product(null, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 21 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 23 | G = nx.tensor_product(null, empty10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 24 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 25 | G = nx.tensor_product(null, K3) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 26 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 27 | G = nx.tensor_product(null, K10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 28 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 29 | G = nx.tensor_product(null, P3) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 30 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 31 | G = nx.tensor_product(null, P10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 32 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 33 | G = nx.tensor_product(empty10, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 34 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 35 | G = nx.tensor_product(K3, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 36 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 37 | G = nx.tensor_product(K10, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 38 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 39 | G = nx.tensor_product(P3, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 40 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 41 | G = nx.tensor_product(P10, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 42 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 138 | G = nx.cartesian_product(null, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 139 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 141 | G = nx.cartesian_product(null, empty10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 142 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 143 | G = nx.cartesian_product(null, K3) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 144 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 145 | G = nx.cartesian_product(null, K10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 146 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 147 | G = nx.cartesian_product(null, P3) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 148 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 149 | G = nx.cartesian_product(null, P10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 150 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 151 | G = nx.cartesian_product(empty10, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 152 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 153 | G = nx.cartesian_product(K3, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 154 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 155 | G = nx.cartesian_product(K10, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 156 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 157 | G = nx.cartesian_product(P3, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 158 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 159 | G = nx.cartesian_product(P10, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 160 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 222 | G = nx.lexicographic_product(null, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 223 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 225 | G = nx.lexicographic_product(null, empty10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 226 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 227 | G = nx.lexicographic_product(null, K3) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 228 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 229 | G = nx.lexicographic_product(null, K10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 230 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 231 | G = nx.lexicographic_product(null, P3) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 232 | assert nx.is_isomorphic(G, null) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 233 | G = nx.lexicographic_product(null, P10) | CODE |
| HIGH⚡ | networkx/algorithms/operators/tests/test_product.py | 234 | assert nx.is_isomorphic(G, null) | CODE |
| 58 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/conftest.py | 138 | CODE | |
| LOW | networkx/conftest.py | 145 | CODE | |
| LOW | networkx/conftest.py | 152 | CODE | |
| LOW | networkx/conftest.py | 159 | CODE | |
| LOW | networkx/conftest.py | 166 | CODE | |
| LOW | networkx/conftest.py | 173 | CODE | |
| LOW | networkx/conftest.py | 183 | CODE | |
| LOW | networkx/convert.py | 161 | CODE | |
| LOW | networkx/__init__.py | 15 | CODE | |
| LOW | networkx/__init__.py | 17 | CODE | |
| LOW | networkx/__init__.py | 20 | CODE | |
| LOW | networkx/__init__.py | 20 | CODE | |
| LOW | networkx/__init__.py | 26 | CODE | |
| LOW | networkx/__init__.py | 27 | CODE | |
| LOW | networkx/__init__.py | 28 | CODE | |
| LOW | networkx/__init__.py | 30 | CODE | |
| LOW | networkx/__init__.py | 31 | CODE | |
| LOW | networkx/__init__.py | 33 | CODE | |
| LOW | networkx/__init__.py | 34 | CODE | |
| LOW | networkx/__init__.py | 36 | CODE | |
| LOW | networkx/__init__.py | 37 | CODE | |
| LOW | networkx/__init__.py | 39 | CODE | |
| LOW | networkx/__init__.py | 40 | CODE | |
| LOW | networkx/__init__.py | 42 | CODE | |
| LOW | networkx/__init__.py | 43 | CODE | |
| LOW | networkx/__init__.py | 46 | CODE | |
| LOW | networkx/__init__.py | 47 | CODE | |
| LOW | networkx/__init__.py | 49 | CODE | |
| LOW | networkx/__init__.py | 50 | CODE | |
| LOW | networkx/__init__.py | 52 | CODE | |
| LOW | networkx/__init__.py | 53 | CODE | |
| LOW | networkx/readwrite/__init__.py | 6 | CODE | |
| LOW | networkx/readwrite/__init__.py | 7 | CODE | |
| LOW | networkx/readwrite/__init__.py | 8 | CODE | |
| LOW | networkx/readwrite/__init__.py | 9 | CODE | |
| LOW | networkx/readwrite/__init__.py | 10 | CODE | |
| LOW | networkx/readwrite/__init__.py | 11 | CODE | |
| LOW | networkx/readwrite/__init__.py | 12 | CODE | |
| LOW | networkx/readwrite/__init__.py | 13 | CODE | |
| LOW | networkx/readwrite/__init__.py | 14 | CODE | |
| LOW | networkx/readwrite/__init__.py | 15 | CODE | |
| LOW | networkx/readwrite/__init__.py | 16 | CODE | |
| LOW | networkx/readwrite/__init__.py | 17 | CODE | |
| LOW | networkx/readwrite/json_graph/__init__.py | 16 | CODE | |
| LOW | networkx/readwrite/json_graph/__init__.py | 17 | CODE | |
| LOW | networkx/readwrite/json_graph/__init__.py | 18 | CODE | |
| LOW | networkx/readwrite/json_graph/__init__.py | 19 | CODE | |
| LOW | networkx/readwrite/tests/test_graphml.py | 1103 | CODE | |
| LOW | networkx/drawing/__init__.py | 3 | CODE | |
| LOW | networkx/drawing/__init__.py | 4 | CODE | |
| LOW | networkx/drawing/__init__.py | 5 | CODE | |
| LOW | networkx/drawing/__init__.py | 6 | CODE | |
| LOW | networkx/drawing/__init__.py | 7 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1483 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1953 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1954 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 2959 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 2960 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1627 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1551 | CODE | |
| 358 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/relabel.py | 135 | CODE | |
| LOW | networkx/relabel.py | 198 | CODE | |
| LOW | networkx/relabel.py | 232 | CODE | |
| LOW | networkx/convert.py | 34 | CODE | |
| LOW | networkx/convert.py | 213 | CODE | |
| LOW | networkx/convert.py | 253 | CODE | |
| LOW | networkx/convert.py | 374 | CODE | |
| LOW | networkx/convert_matrix.py | 496 | CODE | |
| LOW | networkx/convert_matrix.py | 893 | CODE | |
| LOW | networkx/readwrite/gexf.py | 440 | CODE | |
| LOW | networkx/readwrite/gexf.py | 508 | CODE | |
| LOW | networkx/readwrite/gexf.py | 710 | CODE | |
| LOW | networkx/readwrite/gexf.py | 1038 | CODE | |
| LOW | networkx/readwrite/gexf.py | 441 | CODE | |
| LOW | networkx/readwrite/gml.py | 298 | CODE | |
| LOW | networkx/readwrite/gml.py | 528 | CODE | |
| LOW | networkx/readwrite/gml.py | 629 | CODE | |
| LOW | networkx/readwrite/gml.py | 301 | CODE | |
| LOW | networkx/readwrite/gml.py | 377 | CODE | |
| LOW | networkx/readwrite/gml.py | 553 | CODE | |
| LOW | networkx/readwrite/gml.py | 714 | CODE | |
| LOW | networkx/readwrite/sparse6.py | 105 | CODE | |
| LOW | networkx/readwrite/multiline_adjlist.py | 39 | CODE | |
| LOW | networkx/readwrite/multiline_adjlist.py | 196 | CODE | |
| LOW | networkx/readwrite/text.py | 73 | CODE | |
| LOW | networkx/readwrite/pajek.py | 167 | CODE | |
| LOW | networkx/readwrite/graphml.py | 506 | CODE | |
| LOW | networkx/readwrite/graphml.py | 961 | CODE | |
| LOW | networkx/readwrite/edgelist.py | 43 | CODE | |
| LOW | networkx/readwrite/edgelist.py | 177 | CODE | |
| LOW | networkx/readwrite/json_graph/adjacency.py | 8 | CODE | |
| LOW | networkx/readwrite/tests/test_text.py | 1672 | CODE | |
| LOW | networkx/drawing/layout.py | 1608 | CODE | |
| LOW | networkx/drawing/nx_agraph.py | 119 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 257 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 170 | CODE | |
| LOW | networkx/linalg/algebraicconnectivity.py | 256 | CODE | |
| LOW | networkx/linalg/attrmatrix.py | 55 | CODE | |
| LOW | networkx/linalg/attrmatrix.py | 147 | CODE | |
| LOW | networkx/linalg/attrmatrix.py | 312 | CODE | |
| LOW | networkx/classes/graph.py | 2012 | CODE | |
| LOW | networkx/classes/multigraph.py | 538 | CODE | |
| LOW | networkx/classes/reportviews.py | 1089 | CODE | |
| LOW | networkx/classes/reportviews.py | 1502 | CODE | |
| LOW | networkx/classes/function.py | 621 | CODE | |
| LOW | networkx/classes/function.py | 760 | CODE | |
| LOW | networkx/classes/function.py | 797 | CODE | |
| LOW | networkx/classes/function.py | 979 | CODE | |
| LOW | networkx/classes/function.py | 1308 | CODE | |
| LOW | networkx/classes/tests/dispatch_interface.py | 67 | CODE | |
| LOW | networkx/algorithms/planarity.py | 449 | CODE | |
| LOW | networkx/algorithms/planarity.py | 502 | CODE | |
| LOW | networkx/algorithms/planarity.py | 535 | CODE | |
| LOW | networkx/algorithms/planarity.py | 584 | CODE | |
| LOW | networkx/algorithms/planarity.py | 694 | CODE | |
| LOW | networkx/algorithms/planarity.py | 1009 | CODE | |
| LOW | networkx/algorithms/planarity.py | 1084 | CODE | |
| LOW | networkx/algorithms/bridges.py | 146 | CODE | |
| LOW | networkx/algorithms/regular.py | 76 | CODE | |
| LOW | networkx/algorithms/smallworld.py | 28 | CODE | |
| 215 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/exception.py | 9 | __all__ = [ | CODE |
| LOW | networkx/relabel.py | 3 | __all__ = ["convert_node_labels_to_integers", "relabel_nodes"] | CODE |
| LOW | networkx/convert.py | 23 | __all__ = [ | CODE |
| LOW | networkx/convert_matrix.py | 33 | __all__ = [ | CODE |
| LOW | networkx/lazy_imports.py | 8 | __all__ = ["attach", "_lazy_import"] | CODE |
| LOW | networkx/readwrite/gexf.py | 33 | __all__ = ["write_gexf", "read_gexf", "relabel_gexf_graph", "generate_gexf"] | CODE |
| LOW | networkx/readwrite/gml.py | 42 | __all__ = ["read_gml", "parse_gml", "generate_gml", "write_gml"] | CODE |
| LOW | networkx/readwrite/sparse6.py | 19 | __all__ = ["from_sparse6_bytes", "read_sparse6", "to_sparse6_bytes", "write_sparse6"] | CODE |
| LOW | networkx/readwrite/multiline_adjlist.py | 28 | __all__ = [ | CODE |
| LOW | networkx/readwrite/leda.py | 14 | __all__ = ["read_leda", "parse_leda"] | CODE |
| LOW | networkx/readwrite/graph6.py | 19 | __all__ = ["from_graph6_bytes", "read_graph6", "to_graph6_bytes", "write_graph6"] | CODE |
| LOW | networkx/readwrite/text.py | 11 | __all__ = ["generate_network_text", "write_network_text"] | CODE |
| LOW | networkx/readwrite/adjlist.py | 25 | __all__ = ["generate_adjlist", "write_adjlist", "parse_adjlist", "read_adjlist"] | CODE |
| LOW | networkx/readwrite/pajek.py | 22 | __all__ = ["read_pajek", "parse_pajek", "generate_pajek", "write_pajek"] | CODE |
| LOW | networkx/readwrite/graphml.py | 50 | __all__ = [ | CODE |
| LOW | networkx/readwrite/edgelist.py | 30 | __all__ = [ | CODE |
| LOW | networkx/readwrite/json_graph/tree.py | 3 | __all__ = ["tree_data", "tree_graph"] | CODE |
| LOW | networkx/readwrite/json_graph/cytoscape.py | 3 | __all__ = ["cytoscape_data", "cytoscape_graph"] | CODE |
| LOW | networkx/readwrite/json_graph/node_link.py | 5 | __all__ = ["node_link_data", "node_link_graph"] | CODE |
| LOW | networkx/readwrite/json_graph/adjacency.py | 3 | __all__ = ["adjacency_data", "adjacency_graph"] | CODE |
| LOW | networkx/drawing/nx_latex.py | 132 | __all__ = [ | STRING |
| LOW | networkx/drawing/layout.py | 22 | __all__ = [ | CODE |
| LOW | networkx/drawing/nx_pydot.py | 28 | __all__ = [ | CODE |
| LOW | networkx/drawing/nx_agraph.py | 25 | __all__ = [ | CODE |
| LOW | networkx/drawing/nx_pylab.py | 27 | __all__ = [ | CODE |
| LOW | networkx/linalg/algebraicconnectivity.py | 12 | __all__ = [ | CODE |
| LOW | networkx/linalg/bethehessianmatrix.py | 6 | __all__ = ["bethe_hessian_matrix"] | CODE |
| LOW | networkx/linalg/laplacianmatrix.py | 14 | __all__ = [ | CODE |
| LOW | networkx/linalg/modularitymatrix.py | 6 | __all__ = ["modularity_matrix", "directed_modularity_matrix"] | CODE |
| LOW | networkx/linalg/spectrum.py | 7 | __all__ = [ | CODE |
| LOW | networkx/linalg/graphmatrix.py | 7 | __all__ = ["incidence_matrix", "adjacency_matrix"] | CODE |
| LOW | networkx/linalg/attrmatrix.py | 7 | __all__ = ["attr_matrix", "attr_sparse_matrix"] | CODE |
| LOW | networkx/classes/coreviews.py | 8 | __all__ = [ | CODE |
| LOW | networkx/classes/graph.py | 19 | __all__ = ["Graph"] | CODE |
| LOW | networkx/classes/multigraph.py | 12 | __all__ = ["MultiGraph"] | CODE |
| LOW | networkx/classes/reportviews.py | 199 | __all__ = [ | CODE |
| LOW | networkx/classes/multidigraph.py | 19 | __all__ = ["MultiDiGraph"] | CODE |
| LOW | networkx/classes/digraph.py | 18 | __all__ = ["DiGraph"] | CODE |
| LOW | networkx/classes/filters.py | 6 | __all__ = [ | CODE |
| LOW | networkx/classes/function.py | 9 | __all__ = [ | CODE |
| LOW | networkx/classes/graphviews.py | 38 | __all__ = ["generic_graph_view", "subgraph_view", "reverse_view"] | CODE |
| LOW | networkx/algorithms/richclub.py | 8 | __all__ = ["rich_club_coefficient"] | CODE |
| LOW | networkx/algorithms/wiener.py | 22 | __all__ = ["wiener_index", "schultz_index", "gutman_index", "hyper_wiener_index"] | CODE |
| LOW | networkx/algorithms/boundary.py | 16 | __all__ = ["edge_boundary", "node_boundary"] | CODE |
| LOW | networkx/algorithms/planarity.py | 6 | __all__ = ["check_planarity", "is_planar", "PlanarEmbedding"] | CODE |
| LOW | networkx/algorithms/bridges.py | 8 | __all__ = ["bridges", "has_bridges", "local_bridges"] | CODE |
| LOW | networkx/algorithms/chains.py | 6 | __all__ = ["chain_decomposition"] | CODE |
| LOW | networkx/algorithms/regular.py | 6 | __all__ = ["is_regular", "is_k_regular", "k_factor"] | CODE |
| LOW | networkx/algorithms/smallworld.py | 21 | __all__ = ["random_reference", "lattice_reference", "sigma", "omega"] | CODE |
| LOW | networkx/algorithms/sparsifiers.py | 8 | __all__ = ["spanner"] | CODE |
| LOW | networkx/algorithms/similarity.py | 24 | __all__ = [ | CODE |
| LOW | networkx/algorithms/clique.py | 17 | __all__ = [ | CODE |
| LOW | networkx/algorithms/dominating.py | 8 | __all__ = [ | CODE |
| LOW | networkx/algorithms/moral.py | 8 | __all__ = ["moral_graph"] | CODE |
| LOW | networkx/algorithms/lowest_common_ancestors.py | 10 | __all__ = [ | CODE |
| LOW | networkx/algorithms/structuralholes.py | 5 | __all__ = ["constraint", "local_constraint", "effective_size"] | CODE |
| LOW | networkx/algorithms/swap.py | 8 | __all__ = ["double_edge_swap", "connected_double_edge_swap", "directed_edge_swap"] | CODE |
| LOW | networkx/algorithms/dominance.py | 10 | __all__ = ["immediate_dominators", "dominance_frontiers"] | CODE |
| LOW | networkx/algorithms/communicability_alg.py | 8 | __all__ = ["communicability", "communicability_exp"] | CODE |
| LOW | networkx/algorithms/hybrid.py | 11 | __all__ = ["kl_connected_subgraph", "is_kl_connected"] | CODE |
| 202 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | networkx/convert_matrix.py | 861 | # Create an iterable over (u, v, w) triples and for each triple, add an | STRING |
| MEDIUM | networkx/readwrite/tests/test_text.py | 11 | # Create a directed forest with labels | COMMENT |
| MEDIUM | networkx/readwrite/tests/test_text.py | 225 | # Create a directed forest | COMMENT |
| MEDIUM | networkx/readwrite/tests/test_text.py | 1375 | # Create a directed forest with labels | COMMENT |
| MEDIUM | networkx/drawing/nx_pylab.py | 1346 | # Create a set with all valid keywords across the three functions and | STRING |
| MEDIUM⚡ | networkx/drawing/tests/test_agraph.py | 64 | # Create an AGraph from an existing (non-multi) Graph | COMMENT |
| MEDIUM | …workx/drawing/tests/test_image_comparison_pylab_mpl.py | 173 | # Create a list of edges in the shortest path | COMMENT |
| MEDIUM | networkx/drawing/tests/test_pylab.py | 1200 | # Create a single axis object to get consistent pixel coords across | COMMENT |
| MEDIUM | networkx/drawing/tests/test_pylab.py | 1247 | # Create a single axis object to get consistent pixel coords across | COMMENT |
| MEDIUM | networkx/linalg/spectrum.py | 48 | >>> G = nx.Graph() # Create a graph with 5 nodes and 3 connected components | STRING |
| MEDIUM | networkx/classes/graph.py | 1829 | # Create a subgraph SG based on a (possibly multigraph) G | STRING |
| MEDIUM | networkx/classes/tests/test_multidigraph.py | 399 | # Create a quadruply-linked path graph on five nodes. | COMMENT |
| MEDIUM | networkx/classes/tests/test_multigraph.py | 413 | # Create a doubly-linked path graph on five nodes. | COMMENT |
| MEDIUM | networkx/classes/tests/dispatch_interface.py | 1 | # This file contains utilities for testing the dispatching feature | COMMENT |
| MEDIUM | networkx/classes/tests/test_graph.py | 860 | # Create a path graph on five nodes. | COMMENT |
| MEDIUM | networkx/classes/tests/test_subgraphviews.py | 276 | # Create a path graph on five nodes. | COMMENT |
| MEDIUM | networkx/classes/tests/test_digraph.py | 307 | # Create a doubly-linked path graph on five nodes. | COMMENT |
| MEDIUM | networkx/algorithms/richclub.py | 118 | # Create a sorted list of pairs of edge endpoint degrees. | STRING |
| MEDIUM | networkx/algorithms/chains.py | 85 | # Create a directed graph from the depth-first search tree with | COMMENT |
| MEDIUM | networkx/algorithms/chains.py | 149 | # Create a directed version of H that has the DFS edges directed | COMMENT |
| MEDIUM | networkx/algorithms/chains.py | 169 | # Create the cycle or cycle prefix starting with the | COMMENT |
| MEDIUM | networkx/algorithms/node_classification.py | 1 | """This module provides the functions for node classification problem. | STRING |
| MEDIUM | networkx/algorithms/tree/branchings.py | 543 | # Create a new graph of the same class as the input graph | COMMENT |
| MEDIUM | networkx/algorithms/isomorphism/vf2pp.py | 573 | # Create the labels dicts based on node_label and default_label | COMMENT |
| MEDIUM | networkx/algorithms/isomorphism/vf2pp.py | 578 | # Create the degree dicts based on graph type | COMMENT |
| MEDIUM | networkx/algorithms/link_analysis/pagerank_alg.py | 136 | # Create a copy in (right) stochastic form | COMMENT |
| MEDIUM | networkx/algorithms/connectivity/disjoint_paths.py | 7 | # Define the default maximum flow function to use for the underlying | COMMENT |
| MEDIUM | networkx/algorithms/connectivity/connectivity.py | 10 | # Define the default maximum flow function to use in all flow based | COMMENT |
| MEDIUM | networkx/algorithms/connectivity/edge_kcomponents.py | 376 | # This class is a container the holds the auxiliary graph A and | STRING |
| MEDIUM | networkx/algorithms/connectivity/edge_kcomponents.py | 408 | # Create a relevant graph with the auxiliary edges with weights >= k | STRING |
| MEDIUM | networkx/algorithms/connectivity/edge_kcomponents.py | 444 | # Create a relevant graph with the auxiliary edges with weights >= k | STRING |
| MEDIUM | networkx/algorithms/connectivity/kcomponents.py | 11 | # Define the default maximum flow function. | COMMENT |
| MEDIUM | networkx/algorithms/connectivity/cuts.py | 9 | # Define the default maximum flow function to use in all flow based | COMMENT |
| MEDIUM | networkx/algorithms/approximation/steinertree.py | 107 | # Create a complete graph H from the metric edges | COMMENT |
| MEDIUM | networkx/algorithms/approximation/steinertree.py | 130 | # Create an iterator over each edge in each shortest path; repeats are okay | COMMENT |
| MEDIUM | networkx/algorithms/approximation/traveling_salesman.py | 465 | # Create the undirected support of z_star | COMMENT |
| MEDIUM | networkx/algorithms/approximation/traveling_salesman.py | 472 | # Create the exponential distribution of spanning trees | COMMENT |
| MEDIUM | networkx/algorithms/approximation/traveling_salesman.py | 577 | # Create a copy of G without vertex 1. | COMMENT |
| MEDIUM | networkx/algorithms/approximation/traveling_salesman.py | 885 | # Create the laplacian matrices | COMMENT |
| MEDIUM | …kx/algorithms/approximation/tests/test_vertex_cover.py | 17 | # Create a star graph in which half the nodes are directed in | COMMENT |
| MEDIUM | …/algorithms/approximation/tests/test_dominating_set.py | 36 | # Create a star graph in which the center node has the highest | COMMENT |
| MEDIUM | networkx/algorithms/tests/test_dag.py | 51 | # Create the directed path graph on four nodes in a diamond shape, | COMMENT |
| MEDIUM | networkx/algorithms/tests/test_core.py | 44 | # Create the graph H resulting from the degree sequence | COMMENT |
| MEDIUM | networkx/algorithms/tests/test_matching.py | 536 | # Create the path graph with two self-loops. | COMMENT |
| MEDIUM | networkx/algorithms/bipartite/matrix.py | 191 | # Create an iterable over (u, v, w) triples and for each triple, add an | STRING |
| MEDIUM | networkx/algorithms/bipartite/__init__.py | 1 | r"""This module provides functions and operations for bipartite | CODE |
| MEDIUM | networkx/algorithms/bipartite/tests/test_matching.py | 160 | # Create a bipartite graph based on the transitive closure of G | COMMENT |
| MEDIUM | networkx/algorithms/shortest_paths/tests/test_astar.py | 234 | # Create the cycle graph on four nodes, with nodes represented | COMMENT |
| MEDIUM | …workx/algorithms/shortest_paths/tests/test_weighted.py | 363 | # Create a triangle in which the edge from node 0 to node 2 has | COMMENT |
| MEDIUM | …workx/algorithms/shortest_paths/tests/test_weighted.py | 429 | # Create a triangle in which the edge from node 0 to node 2 has | COMMENT |
| MEDIUM | networkx/algorithms/community/label_propagation.py | 268 | # Create a unique label for each node in the graph | COMMENT |
| MEDIUM | networkx/algorithms/flow/maxflow.py | 14 | # Define the default flow function for computing maximum flow. | COMMENT |
| MEDIUM | networkx/generators/social.py | 47 | # Create the set of all members, and the members of each club. | COMMENT |
| MEDIUM | networkx/generators/geometric.py | 1021 | # Create an edge with a certain connection probability | STRING |
| MEDIUM | networkx/generators/line.py | 141 | # Create a graph specific edge function. | STRING |
| MEDIUM | networkx/generators/trees.py | 496 | # The following functions support generation of unlabeled trees and forests. | COMMENT |
| MEDIUM | examples/3d_drawing/plot_3d_animation_walk.py | 21 | # Define a graph to plot. | COMMENT |
| MEDIUM | examples/3d_drawing/plot_basic.py | 24 | # Create the 3D figure | COMMENT |
| MEDIUM | examples/3d_drawing/plot_3d_animation_basic.py | 19 | # Define a graph to plot. | COMMENT |
| MEDIUM | examples/drawing/plot_ego_graph.py | 15 | # Create a BA model graph - use seed for reproducibility | COMMENT |
| 13 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | networkx/classes/graph.py | 0 | graph adjacency object holding the successors of each node. this object is a read-only dict-like structure with node key | STRING |
| HIGH | networkx/classes/digraph.py | 0 | graph adjacency object holding the successors of each node. this object is a read-only dict-like structure with node key | STRING |
| HIGH | networkx/classes/multidigraph.py | 0 | graph adjacency object holding the successors of each node. this object is a read-only dict-like structure with node key | STRING |
| HIGH | networkx/classes/graph.py | 0 | remove all edges specified in ebunch. parameters ---------- ebunch: list or container of edge tuples each pair of half-e | STRING |
| HIGH | networkx/classes/digraph.py | 0 | remove all edges specified in ebunch. parameters ---------- ebunch: list or container of edge tuples each pair of half-e | STRING |
| HIGH | networkx/algorithms/planarity.py | 0 | remove all edges specified in ebunch. parameters ---------- ebunch: list or container of edge tuples each pair of half-e | STRING |
| HIGH | networkx/classes/graph.py | 0 | returns true if graph is a multigraph, false otherwise. | STRING |
| HIGH | networkx/classes/multigraph.py | 0 | returns true if graph is a multigraph, false otherwise. | STRING |
| HIGH | networkx/classes/multidigraph.py | 0 | returns true if graph is a multigraph, false otherwise. | STRING |
| HIGH | networkx/classes/digraph.py | 0 | returns true if graph is a multigraph, false otherwise. | STRING |
| HIGH | networkx/classes/graph.py | 0 | returns true if graph is directed, false otherwise. | STRING |
| HIGH | networkx/classes/multigraph.py | 0 | returns true if graph is directed, false otherwise. | STRING |
| HIGH | networkx/classes/multidigraph.py | 0 | returns true if graph is directed, false otherwise. | STRING |
| HIGH | networkx/classes/digraph.py | 0 | returns true if graph is directed, false otherwise. | STRING |
| HIGH | networkx/classes/tests/test_multigraph.py | 0 | tests that adding a node to the original graph does not affect the nodes of the subgraph. | STRING |
| HIGH | networkx/classes/tests/test_graph.py | 0 | tests that adding a node to the original graph does not affect the nodes of the subgraph. | STRING |
| HIGH | networkx/classes/tests/test_subgraphviews.py | 0 | tests that adding a node to the original graph does not affect the nodes of the subgraph. | STRING |
| HIGH | networkx/classes/tests/test_multigraph.py | 0 | tests that the node attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_graph.py | 0 | tests that the node attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_subgraphviews.py | 0 | tests that the node attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_multigraph.py | 0 | tests that the edge attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_graph.py | 0 | tests that the edge attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_subgraphviews.py | 0 | tests that the edge attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_multigraph.py | 0 | tests that the graph attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_graph.py | 0 | tests that the graph attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/classes/tests/test_subgraphviews.py | 0 | tests that the graph attribute dictionary of the two graphs is the same object. | STRING |
| HIGH | networkx/algorithms/flow/dinitz_alg.py | 0 | find a maximum single-commodity flow using the edmonds-karp algorithm. this function returns the residual network result | STRING |
| HIGH | networkx/algorithms/flow/shortestaugmentingpath.py | 0 | find a maximum single-commodity flow using the edmonds-karp algorithm. this function returns the residual network result | STRING |
| HIGH | networkx/algorithms/flow/edmondskarp.py | 0 | find a maximum single-commodity flow using the edmonds-karp algorithm. this function returns the residual network result | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | networkx/drawing/nx_pylab.py | 2102 | # --------------------------------------- | STRING |
| MEDIUM⚡ | …algorithms/connectivity/tests/test_edge_kcomponents.py | 10 | # ---------------- | COMMENT |
| MEDIUM⚡ | …algorithms/connectivity/tests/test_edge_kcomponents.py | 12 | # ---------------- | COMMENT |
| MEDIUM | …algorithms/connectivity/tests/test_edge_kcomponents.py | 132 | # ---------------- | COMMENT |
| MEDIUM | …algorithms/connectivity/tests/test_edge_kcomponents.py | 134 | # ---------------- | COMMENT |
| MEDIUM | …algorithms/connectivity/tests/test_edge_kcomponents.py | 188 | # ---------------- | COMMENT |
| MEDIUM | …algorithms/connectivity/tests/test_edge_kcomponents.py | 190 | # ---------------- | COMMENT |
| MEDIUM | …algorithms/connectivity/tests/test_edge_kcomponents.py | 422 | # ---------------- | COMMENT |
| MEDIUM | …algorithms/connectivity/tests/test_edge_kcomponents.py | 424 | # ---------------- | COMMENT |
| MEDIUM | networkx/algorithms/tests/test_max_weight_clique.py | 168 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/algorithms/coloring/tests/test_coloring.py | 785 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/algorithms/coloring/tests/test_coloring.py | 797 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/algorithms/coloring/tests/test_coloring.py | 829 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/generators/classic.py | 45 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/generators/classic.py | 47 | # ------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/generators/small.py | 141 | # ------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | networkx/generators/small.py | 143 | # ------------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/3d_drawing/plot_3d_animation_walk.py | 22 | # ----------------------- | COMMENT |
| MEDIUM | examples/3d_drawing/plot_3d_animation_walk.py | 33 | # ------------------------------------------- | COMMENT |
| MEDIUM | examples/3d_drawing/plot_3d_animation_basic.py | 20 | # ----------------------- | COMMENT |
| MEDIUM | examples/3d_drawing/plot_3d_animation_basic.py | 31 | # ---------------------------- | COMMENT |
| MEDIUM | …ms/plot_image_segmentation_spectral_graph_partition.py | 27 | # ----------------------------------------- | COMMENT |
| MEDIUM | …ms/plot_image_segmentation_spectral_graph_partition.py | 52 | # --------------------------------- | COMMENT |
| MEDIUM | …ms/plot_image_segmentation_spectral_graph_partition.py | 66 | # -------------------------------------------------- | COMMENT |
| MEDIUM | …ms/plot_image_segmentation_spectral_graph_partition.py | 92 | # ------------------------------- | COMMENT |
| MEDIUM | …ms/plot_image_segmentation_spectral_graph_partition.py | 140 | # -------------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_circuits.py | 60 | # ---------------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 81 | # --------------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 108 | # ------------------------ | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 122 | # ------------------------------------------------------------------------ | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 128 | # --------------------------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 143 | # --------------------------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 154 | # -------------------------------------------------------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_subgraphs.py | 160 | # ----------------------------- | COMMENT |
| MEDIUM | examples/algorithms/plot_beam_search.py | 75 | # --------------------------------------- | COMMENT |
| MEDIUM | examples/external/plot_hiveplotlib.py | 26 | # ---------------------------------- | COMMENT |
| MEDIUM | examples/external/plot_hiveplotlib.py | 46 | # -------------- | COMMENT |
| MEDIUM | examples/external/plot_igraph.py | 16 | # ------------------ | COMMENT |
| MEDIUM | examples/external/plot_igraph.py | 46 | # ------------------ | COMMENT |
| MEDIUM | doc/conf.py | 12 | # --------------------- | COMMENT |
| MEDIUM | doc/conf.py | 133 | # ----------------------- | STRING |
| MEDIUM | doc/conf.py | 213 | # ------------------------ | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/convert_matrix.py | 861 | # Create an iterable over (u, v, w) triples and for each triple, add an | COMMENT |
| LOW | networkx/readwrite/text.py | 341 | # (1) children to traverse into after showing this node. | COMMENT |
| LOW | networkx/drawing/layout.py | 681 | COMMENT | |
| LOW | networkx/linalg/attrmatrix.py | 121 | else: | COMMENT |
| LOW | networkx/algorithms/chains.py | 81 | COMMENT | |
| LOW | networkx/algorithms/chains.py | 141 | visited.add(v) | COMMENT |
| LOW | networkx/algorithms/distance_regular.py | 261 | # Here is an alternate implementation based directly on the | COMMENT |
| LOW | networkx/algorithms/matching.py | 381 | # The algorithm is taken from "Efficient Algorithms for Finding Maximum | COMMENT |
| LOW | networkx/algorithms/matching.py | 441 | mate = {} | COMMENT |
| LOW | networkx/algorithms/matching.py | 461 | COMMENT | |
| LOW | networkx/algorithms/matching.py | 481 | # If b is a (possibly trivial) top-level S-blossom, | COMMENT |
| LOW | networkx/algorithms/cycles.py | 601 | # must not construct longer cycles along (u, v). | COMMENT |
| LOW | networkx/algorithms/tree/branchings.py | 281 | # These are the buckets from the paper. | COMMENT |
| LOW | networkx/algorithms/tree/branchings.py | 301 | COMMENT | |
| LOW | networkx/algorithms/tree/branchings.py | 521 | COMMENT | |
| LOW | networkx/algorithms/tree/mst.py | 101 | minwt = wt | COMMENT |
| LOW | networkx/algorithms/tree/mst.py | 121 | # component was empty, so that part of the forest has been | COMMENT |
| LOW | networkx/algorithms/tree/mst.py | 841 | # The result is a MultiGraph version of G so that parallel edges are | COMMENT |
| LOW | networkx/algorithms/tree/mst.py | 901 | # There are two cases for the total spanning tree additive weight. | COMMENT |
| LOW | networkx/algorithms/tree/tests/test_mst.py | 621 | # expect to see each tree. This test uses a near minimum sample size where | COMMENT |
| LOW | networkx/algorithms/tree/tests/test_mst.py | 741 | COMMENT | |
| LOW | networkx/algorithms/isomorphism/tree_isomorphism.py | 141 | # each node has a label, initially set to 0 | COMMENT |
| LOW | networkx/algorithms/isomorphism/isomorphvf2.py | 501 | This function returns True if it is adding the candidate pair | COMMENT |
| LOW | networkx/algorithms/isomorphism/isomorphvf2.py | 701 | # core_1[n] contains the index of the node paired with n, which is m, | COMMENT |
| LOW | networkx/algorithms/isomorphism/isomorphvf2.py | 741 | # Basically, when we test the look-ahead rules R_pred and R_succ, we | COMMENT |
| LOW | networkx/algorithms/isomorphism/vf2pp.py | 481 | COMMENT | |
| LOW | networkx/algorithms/isomorphism/tests/test_common.py | 41 | # vf2pp_subgraph_isomorphism() | COMMENT |
| LOW | networkx/algorithms/isomorphism/tests/test_ismags.py | 101 | id="katebi-paper-fig2", | COMMENT |
| LOW | networkx/algorithms/connectivity/edge_augmentation.py | 761 | >>> G = nx.Graph([(0, 1), (0, 2), (1, 2)]) | COMMENT |
| LOW | networkx/algorithms/connectivity/edge_augmentation.py | 941 | COMMENT | |
| LOW | networkx/algorithms/connectivity/kcutsets.py | 141 | # and step 5: build the associated residual network R | COMMENT |
| LOW | …orithms/approximation/tests/test_traveling_salesman.py | 781 | ) | COMMENT |
| LOW | …kx/algorithms/centrality/tests/test_load_centrality.py | 261 | for n in sorted(G): | COMMENT |
| LOW | networkx/algorithms/tests/test_cycles.py | 621 | } | COMMENT |
| LOW | networkx/algorithms/tests/test_dag.py | 781 | # # Determine the root node of the branching. | COMMENT |
| LOW | networkx/algorithms/tests/test_richclub.py | 141 | # T = nx.balanced_tree(2,10) | COMMENT |
| LOW | networkx/algorithms/tests/test_wiener.py | 21 | # In P_n, there are n - 1 pairs of vertices at distance one, n - | COMMENT |
| LOW | networkx/algorithms/bipartite/matching.py | 281 | # for u in G: | COMMENT |
| LOW | networkx/algorithms/traversal/beamsearch.py | 81 | # | COMMENT |
| LOW | networkx/algorithms/community/tests/test_quality.py | 481 | # (0,1)=2, (1,2)=3, (0,2)=1 | COMMENT |
| LOW | networkx/algorithms/flow/utils.py | 121 | ] | COMMENT |
| LOW | networkx/algorithms/flow/tests/test_maxflow.py | 121 | # H | COMMENT |
| LOW | networkx/algorithms/flow/tests/test_maxflow.py | 401 | # flow solution using capacity=my_cap | COMMENT |
| LOW | networkx/utils/backends.py | 1 | # Notes about NetworkX namespace objects set up here: | COMMENT |
| LOW | networkx/utils/backends.py | 821 | # ########################## | COMMENT |
| LOW | networkx/utils/backends.py | 841 | # `backend_priority` before running with the default "networkx" implementation. | COMMENT |
| LOW | networkx/utils/backends.py | 861 | # +-------+-------+ | COMMENT |
| LOW | networkx/utils/backends.py | 901 | group3 = graph_backend_names - seen | COMMENT |
| LOW | networkx/utils/decorators.py | 961 | COMMENT | |
| LOW | networkx/generators/expanders.py | 21 | # | COMMENT |
| LOW | networkx/generators/atlas.py | 21 | #: This is the absolute path of the gzipped text file containing the | COMMENT |
| LOW | networkx/generators/atlas.py | 41 | #: import gzip | COMMENT |
| LOW | examples/algorithms/plot_subgraphs.py | 141 | ############################################################################### | COMMENT |
| LOW | examples/algorithms/plot_beam_search.py | 61 | width = initial_width * pow(2, i) | COMMENT |
| LOW | examples/external/plot_hiveplotlib.py | 41 | ) | COMMENT |
| LOW | examples/geospatial/plot_points.py | 21 | # are a format for storing geographic data that is backed | COMMENT |
| LOW | examples/geospatial/plot_polygons.py | 21 | # used as a file format for geographic data. | COMMENT |
| LOW | examples/geospatial/plot_delaunay.py | 21 | # read in example data from a geopackage file. Geopackages | COMMENT |
| LOW | examples/geospatial/plot_delaunay.py | 41 | # the bounding box of the point pattern. This is controlled by the "clip" argument. | COMMENT |
| LOW | doc/conf.py | 101 | # | COMMENT |
| 1 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/readwrite/gexf.py | 583 | # Check if the type of the attribute value is consistent with the type of the attribute | COMMENT |
| LOW | networkx/drawing/nx_pylab.py | 2034 | # Check if edge_color is an array of floats and map to edge_cmap. | STRING |
| LOW | networkx/algorithms/planarity.py | 1114 | # Check if opposite half-edge exists | COMMENT |
| LOW | networkx/algorithms/chains.py | 145 | # Check if the root is in the graph G. If not, raise NodeNotFound | COMMENT |
| LOW | networkx/algorithms/smallworld.py | 108 | # Check if the graph is still connected | COMMENT |
| LOW | networkx/algorithms/smallworld.py | 232 | # Check if the graph is still connected | COMMENT |
| LOW | networkx/algorithms/similarity.py | 1583 | # Check if k is provided and validate it against the number of nodes | COMMENT |
| LOW | networkx/algorithms/dominating.py | 221 | # Check if u's unseen-degree changed while in the heap | STRING |
| LOW | networkx/algorithms/structuralholes.py | 149 | # Check if scipy is available | STRING |
| LOW | networkx/algorithms/structuralholes.py | 265 | # Check if scipy is available | STRING |
| LOW | networkx/algorithms/matching.py | 615 | # Set label to S. | COMMENT |
| LOW | networkx/algorithms/graphical.py | 179 | # Add back to the list any non-zero stubs that were removed | STRING |
| LOW | networkx/algorithms/graphical.py | 261 | if dk < k + 1: # Check if already past Durfee index | STRING |
| LOW | networkx/algorithms/graphical.py | 265 | if dk < k + run_size: # Check if end of run is past Durfee index | STRING |
| LOW | networkx/algorithms/graphical.py | 469 | # Check if target is now totally connected | STRING |
| LOW | networkx/algorithms/planar_drawing.py | 428 | # Check if the face has already been calculated | COMMENT |
| LOW | networkx/algorithms/isomorphism/vf2pp.py | 493 | # Check if SG and FG have the same labels, and check that the | COMMENT |
| LOW | …workx/algorithms/isomorphism/tests/test_isomorphvf2.py | 370 | # Check if StopIteration exception returns False | COMMENT |
| LOW | networkx/algorithms/link_analysis/pagerank_alg.py | 269 | # Assign dangling_weights to any dangling nodes (nodes with no out links) | COMMENT |
| LOW | networkx/algorithms/connectivity/kcutsets.py | 130 | # Check if X is a k-node-cutset | STRING |
| LOW | networkx/algorithms/approximation/traveling_salesman.py | 933 | # Check if the for loop terminated without changing any gamma | COMMENT |
| LOW | …workx/algorithms/approximation/tests/test_treewidth.py | 24 | # Check if each connected pair of nodes are at least once together in a bag | COMMENT |
| LOW | …workx/algorithms/approximation/tests/test_treewidth.py | 33 | # Check if the nodes associated with vertex v form a connected subset of T | COMMENT |
| LOW | networkx/algorithms/tests/test_planar_drawing.py | 134 | # Check if float numbers are basically equal, for python >=3.5 there is | COMMENT |
| LOW | networkx/algorithms/tests/test_planar_drawing.py | 164 | # Check if end points are different | COMMENT |
| LOW | networkx/algorithms/tests/test_planar_drawing.py | 181 | # Check if intersection lies between the points | COMMENT |
| LOW | networkx/algorithms/tests/test_planarity.py | 387 | # Check if we can remove the node | COMMENT |
| LOW | networkx/algorithms/assortativity/connectivity.py | 105 | # Check if `source_nodes` is actually a single node in the graph. | STRING |
| LOW | networkx/algorithms/community/local.py | 113 | # Check if nbr should be removed from boundary nodes | COMMENT |
| LOW | networkx/algorithms/community/modularity_max.py | 199 | # Check if replaced dq is row max | STRING |
| LOW | networkx/algorithms/community/modularity_max.py | 430 | # Check if strictly better or tie | STRING |
| LOW | networkx/utils/backends.py | 593 | # Check if any graph comes from a backend | COMMENT |
| LOW | networkx/utils/backends.py | 2059 | # Iterate over the items in `cache` to see if any are compatible. | COMMENT |
| LOW | networkx/utils/mapped_queue.py | 252 | # Set child_pos to index of smaller child. | COMMENT |
| LOW | networkx/generators/degree_seq.py | 525 | # Add back to the list any nonzero stubs that were removed | STRING |
| LOW | networkx/generators/degree_seq.py | 628 | # Check if source is now totally connected | STRING |
| LOW | networkx/generators/community.py | 577 | # Check if dimensions match | COMMENT |
| LOW | examples/algorithms/plot_blockmodel.py | 70 | # Set positions to mean of positions of internal nodes from original graph | COMMENT |
| LOW | examples/algorithms/plot_greedy_coloring.py | 22 | # Assign colors to nodes based on the greedy coloring | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | networkx/algorithms/tree/branchings.py | 285 | # consistent with G^i. In this implementation, D^i and E^i are stored | COMMENT |
| HIGH⚡ | …orkx/algorithms/connectivity/tests/test_kcomponents.py | 120 | # In this example graph there are 8 3-components, 4 with 15 nodes | COMMENT |
| HIGH | …rkx/algorithms/approximation/tests/test_kcomponents.py | 237 | # In this example graph there are 8 3-components, 4 with 15 nodes | COMMENT |
| HIGH | networkx/generators/degree_seq.py | 115 | # gives a random pairing of nodes. In this implementation, we | COMMENT |
| HIGH | examples/3d_drawing/plot_3d_animation_basic.py | 33 | # In this example, a frame update is only a rotation of a given 3D graph. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/readwrite/json_graph/node_link.py | 143 | CODE | |
| LOW | networkx/drawing/nx_latex.py | 140 | CODE | |
| LOW | networkx/drawing/nx_latex.py | 310 | CODE | |
| LOW | networkx/drawing/layout.py | 452 | CODE | |
| LOW | networkx/drawing/layout.py | 726 | CODE | |
| LOW | networkx/drawing/layout.py | 1472 | CODE | |
| LOW | networkx/drawing/layout.py | 1608 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1373 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1763 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 2138 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 2291 | CODE | |
| LOW | networkx/drawing/nx_pylab.py | 1606 | CODE | |
| LOW | networkx/algorithms/similarity.py | 39 | CODE | |
| LOW | networkx/algorithms/similarity.py | 211 | CODE | |
| LOW | networkx/algorithms/similarity.py | 387 | CODE | |
| LOW | networkx/algorithms/similarity.py | 540 | CODE | |
| LOW | networkx/algorithms/similarity.py | 1512 | CODE | |
| LOW | networkx/algorithms/similarity.py | 1768 | CODE | |
| LOW | networkx/algorithms/walks.py | 78 | CODE | |
| LOW | networkx/algorithms/isomorphism/vf2pp.py | 710 | CODE | |
| LOW | networkx/algorithms/isomorphism/vf2pp.py | 759 | CODE | |
| LOW | networkx/algorithms/approximation/traveling_salesman.py | 1050 | CODE | |
| LOW | networkx/algorithms/approximation/traveling_salesman.py | 1280 | CODE | |
| LOW | …orkx/algorithms/centrality/current_flow_betweenness.py | 26 | CODE | |
| LOW | networkx/utils/backends.py | 218 | CODE | |
| LOW | networkx/generators/geometric.py | 334 | CODE | |
| LOW | networkx/generators/community.py | 808 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | networkx/convert.py | 90 | except Exception as err: | CODE |
| LOW⚡ | networkx/convert.py | 99 | except Exception as err1: | CODE |
| LOW⚡ | networkx/convert.py | 106 | except Exception as err2: | CODE |
| LOW | networkx/convert.py | 120 | except Exception as err: | CODE |
| LOW | networkx/convert.py | 131 | except Exception as err: | CODE |
| LOW | networkx/convert.py | 139 | except Exception as err: | CODE |
| LOW | networkx/convert.py | 152 | except Exception as err: | CODE |
| LOW | networkx/convert.py | 166 | except Exception as err: | CODE |
| LOW | networkx/convert.py | 180 | except Exception as err: | CODE |
| LOW | networkx/convert_matrix.py | 212 | except Exception as err: | STRING |
| LOW | networkx/convert_matrix.py | 1274 | except Exception as err: | STRING |
| LOW | networkx/readwrite/gml.py | 413 | except Exception: | CODE |
| LOW | networkx/readwrite/edgelist.py | 260 | except Exception as err: | CODE |
| LOW | networkx/readwrite/edgelist.py | 276 | except Exception as err: | CODE |
| LOW | networkx/readwrite/edgelist.py | 290 | except Exception as err: | CODE |
| LOW | networkx/readwrite/tests/test_text.py | 1740 | except Exception: | CODE |
| LOW | networkx/classes/multigraph.py | 375 | except Exception as err: | CODE |
| LOW | networkx/classes/multidigraph.py | 366 | except Exception as err: | CODE |
| LOW | …lgorithms/connectivity/tests/test_edge_augmentation.py | 385 | except Exception: | CODE |
| LOW | networkx/utils/backends.py | 87 | except Exception as exc: | CODE |
| LOW | networkx/utils/backends.py | 1447 | except Exception: | CODE |
| LOW | networkx/utils/backends.py | 1467 | except Exception: | CODE |
| LOW | networkx/utils/tests/test_decorators.py | 526 | except Exception as e: | CODE |
| LOW | benchmarks/benchmarks/utils.py | 86 | except Exception as exc: # network/IO/parse failure | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | pyproject.toml | 400 | # the rattler backend (py-rattler/conda-forge) from this single harness env; | COMMENT |
| MEDIUM | networkx/classes/tests/dispatch_interface.py | 6 | # This is comprehensive, but only tests the `test_override_dispatch` | COMMENT |
| LOW | networkx/algorithms/threshold.py | 341 | # if type is 'i' just add nodea | COMMENT |
| LOW | networkx/algorithms/centrality/reaching.py | 198 | # If the graph is unweighted, simply return the proportion of nodes | COMMENT |
| LOW | networkx/algorithms/bipartite/basic.py | 141 | # this should maybe just return False? | COMMENT |
| LOW | …kx/algorithms/assortativity/tests/test_connectivity.py | 140 | # just return the connectivity value itself? | COMMENT |
| MEDIUM | networkx/algorithms/community/lukes.py | 115 | # - brevity: we can leverage global "safe_G" | COMMENT |
| LOW | networkx/algorithms/community/centrality.py | 123 | # If the graph is already empty, simply return its connected | COMMENT |
| LOW | networkx/generators/line.py | 475 | # in this case either triangle works, so just use T | COMMENT |
| LOW | networkx/generators/harary_graph.py | 145 | # In case of connectivity 1, simply return the path graph. | STRING |
| LOW | networkx/generators/random_graphs.py | 797 | # For simplicity, if p == 0 or 1, just return BA | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | benchmarks/benchmarks/utils.py | 11 | Generate a string name for a graph-generating function and its arguments. This function takes a graph constructor ( | STRING |
| HIGH | benchmarks/benchmarks/utils.py | 47 | Generate a graph using the given function and assign random edge weights. Parameters: weight_seed (int | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/classes/tests/test_graphviews.py | 39 | def my_method(self): | CODE |
| LOW | networkx/classes/tests/test_graphviews.py | 337 | def my_method(self): | CODE |
| LOW | networkx/generators/random_graphs.py | 1382 | def my_function(b): | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | networkx/algorithms/isomorphism/vf2pp.py | 902 | and node1 is mapped to node2. The purpose of this function is to avoid brute | STRING |