Repository Analysis

networkx/networkx

Network Analysis in Python

21.2 Moderate AI signal View on GitHub

Analysis Overview

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).

21.2
Adjusted Score
21.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
17.1K
Stars
Python
Language
206.8K
Lines of Code
748
Files
3.5K
Pattern Hits
2026-07-14
Scan Date
0.21
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 154MEDIUM 118LOW 3209

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers2091 hits · 2216 pts
SeverityFileLineSnippetContext
LOWnetworkx/conftest.py79def pytest_collection_modifyitems(config, items):CODE
LOWnetworkx/relabel.py232def convert_node_labels_to_integers(CODE
LOWnetworkx/readwrite/gexf.py710 def alter_graph_mode_timeformat(self, start_or_end):CODE
LOWnetworkx/readwrite/multiline_adjlist.py39def generate_multiline_adjlist(G, delimiter=" "):CODE
LOWnetworkx/readwrite/json_graph/tests/test_adjacency.py61 def test_input_data_is_not_modified_when_building_graph(self):CODE
LOWnetworkx/readwrite/json_graph/tests/test_adjacency.py69 def test_adjacency_form_json_serialisable(self):CODE
LOWnetworkx/readwrite/json_graph/tests/test_node_link.py52 def test_graph_with_tuple_nodes(self):CODE
LOWnetworkx/readwrite/json_graph/tests/test_cytoscape.py16def test_input_data_is_not_modified_when_building_graph():CODE
LOWnetworkx/readwrite/tests/test_graph6.py40 def test_read_equals_from_bytes(self):CODE
LOWnetworkx/readwrite/tests/test_graph6.py84 def test_large_complete_graph(self):CODE
LOWnetworkx/readwrite/tests/test_graph6.py94 def test_complete_bipartite_graph(self):CODE
LOWnetworkx/readwrite/tests/test_graph6.py102 def test_no_directed_or_multi_graphs(self, G):CODE
LOWnetworkx/readwrite/tests/test_graph6.py152 def test_large_complete_graph(self):CODE
LOWnetworkx/readwrite/tests/test_graph6.py160 def test_complete_bipartite_graph(self):CODE
LOWnetworkx/readwrite/tests/test_graph6.py165 def test_no_directed_or_multi_graphs(self, G):CODE
LOWnetworkx/readwrite/tests/test_gexf.py44def test_dynamic_graph_has_timeformat(time_attr, dyn_attr, tmp_path):STRING
LOWnetworkx/readwrite/tests/test_gexf.py64def test_dynamic_boolean_attvalue_is_lowercase(tmp_path):CODE
LOWnetworkx/readwrite/tests/test_gexf.py209 def test_read_simple_directed_graphml(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py217 def test_write_read_simple_directed_graphml(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py228 def test_read_simple_undirected_graphml(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py237 def test_read_attribute_graphml(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py248 def test_directed_edge_in_undirected(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py265 def test_undirected_edge_in_directed(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py342 def test_serialize_ints_to_strings(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py352 def test_write_with_node_attributes(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py536 def test_multigraph_with_missing_attributes(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py552 def test_missing_viz_attributes(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py634 def test_round_trip_mixed_type_float_to_string(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py646 def test_round_trip_mixed_type_int_to_string(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py658 def test_type_promotion_integer_to_integer(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py673 def test_type_promotion_float_to_float(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py688 def test_meta_description_keywords_round_trip(self):CODE
LOWnetworkx/readwrite/tests/test_sparse6.py58 def test_from_bytes_multigraph_graph(self):CODE
LOWnetworkx/readwrite/tests/test_sparse6.py118 def test_very_large_empty_graph(self):CODE
LOWnetworkx/readwrite/tests/test_pajek.py130 def test_quotes_and_backslashes_roundtrip(self):CODE
LOWnetworkx/readwrite/tests/test_gml.py59 def test_parse_gml_cytoscape_bug(self):STRING
LOWnetworkx/readwrite/tests/test_gml.py233 def test_tuple_label_quote_escape(self):CODE
LOWnetworkx/readwrite/tests/test_gml.py653 def test_writing_graph_with_multi_element_property_list(self):STRING
LOWnetworkx/readwrite/tests/test_gml.py677 def test_writing_graph_with_one_element_property_list(self):STRING
LOWnetworkx/readwrite/tests/test_gml.py697 def test_reading_graph_with_list_property(self):STRING
LOWnetworkx/readwrite/tests/test_gml.py719 def test_reading_graph_with_single_element_list_property(self):STRING
LOWnetworkx/readwrite/tests/test_gml.py741def test_stringize_empty_list_tuple(coll):STRING
LOWnetworkx/readwrite/tests/test_edgelist.py80def test_read_edgelist_no_data(data, extra_kwargs):CODE
LOWnetworkx/readwrite/tests/test_edgelist.py86def test_read_weighted_edgelist():CODE
LOWnetworkx/readwrite/tests/test_edgelist.py104def test_read_edgelist_with_data(data, extra_kwargs, expected):CODE
LOWnetworkx/readwrite/tests/test_edgelist.py117def test_parse_edgelist_no_data(example_graph):CODE
LOWnetworkx/readwrite/tests/test_edgelist.py124def test_parse_edgelist_with_data_dict(example_graph):CODE
LOWnetworkx/readwrite/tests/test_edgelist.py133def test_parse_edgelist_with_data_list(example_graph):CODE
LOWnetworkx/readwrite/tests/test_edgelist.py293 def test_edgelist_multidigraph(self, tmp_path):CODE
LOWnetworkx/readwrite/tests/test_edgelist.py304def test_edgelist_consistent_strip_handling():CODE
LOWnetworkx/readwrite/tests/test_adjlist.py59 def test_multiple_edges_undirected(self):CODE
LOWnetworkx/readwrite/tests/test_adjlist.py69 def test_multiple_edges_directed(self):CODE
LOWnetworkx/readwrite/tests/test_adjlist.py83 def test_multiple_edges_with_data(self):CODE
LOWnetworkx/readwrite/tests/test_adjlist.py209 def test_adjlist_multidigraph(self, tmp_path):STRING
LOWnetworkx/readwrite/tests/test_adjlist.py243 def test_parse_multiline_adjlist(self):STRING
LOWnetworkx/readwrite/tests/test_adjlist.py270 def test_multiline_adjlist_graph(self, tmp_path):STRING
LOWnetworkx/readwrite/tests/test_adjlist.py280 def test_multiline_adjlist_digraph(self, tmp_path):STRING
LOWnetworkx/readwrite/tests/test_adjlist.py290 def test_multiline_adjlist_integers(self, tmp_path):STRING
LOWnetworkx/readwrite/tests/test_adjlist.py300 def test_multiline_adjlist_multigraph(self, tmp_path):STRING
LOWnetworkx/readwrite/tests/test_adjlist.py312 def test_multiline_adjlist_multidigraph(self, tmp_path):STRING
2031 more matches not shown…
Cross-Language Confusion118 hits · 590 pts
SeverityFileLineSnippetContext
HIGHnetworkx/algorithms/simple_paths.py539 listB.push(length, path)CODE
HIGHnetworkx/algorithms/simple_paths.py559 listB.push(root_length + length, path)CODE
HIGHnetworkx/algorithms/operators/tests/test_unary.py26 nullcc = nx.complement(nx.complement(null))CODE
HIGHnetworkx/algorithms/operators/tests/test_unary.py27 assert nx.is_isomorphic(null, nullcc)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py20 G = nx.tensor_product(null, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py21 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py23 G = nx.tensor_product(null, empty10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py24 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py25 G = nx.tensor_product(null, K3)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py26 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py27 G = nx.tensor_product(null, K10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py28 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py29 G = nx.tensor_product(null, P3)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py30 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py31 G = nx.tensor_product(null, P10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py32 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py33 G = nx.tensor_product(empty10, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py34 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py35 G = nx.tensor_product(K3, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py36 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py37 G = nx.tensor_product(K10, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py38 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py39 G = nx.tensor_product(P3, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py40 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py41 G = nx.tensor_product(P10, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py42 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py138 G = nx.cartesian_product(null, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py139 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py141 G = nx.cartesian_product(null, empty10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py142 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py143 G = nx.cartesian_product(null, K3)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py144 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py145 G = nx.cartesian_product(null, K10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py146 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py147 G = nx.cartesian_product(null, P3)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py148 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py149 G = nx.cartesian_product(null, P10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py150 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py151 G = nx.cartesian_product(empty10, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py152 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py153 G = nx.cartesian_product(K3, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py154 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py155 G = nx.cartesian_product(K10, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py156 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py157 G = nx.cartesian_product(P3, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py158 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py159 G = nx.cartesian_product(P10, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py160 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py222 G = nx.lexicographic_product(null, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py223 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py225 G = nx.lexicographic_product(null, empty10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py226 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py227 G = nx.lexicographic_product(null, K3)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py228 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py229 G = nx.lexicographic_product(null, K10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py230 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py231 G = nx.lexicographic_product(null, P3)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py232 assert nx.is_isomorphic(G, null)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py233 G = nx.lexicographic_product(null, P10)CODE
HIGHnetworkx/algorithms/operators/tests/test_product.py234 assert nx.is_isomorphic(G, null)CODE
58 more matches not shown…
Unused Imports418 hits · 354 pts
SeverityFileLineSnippetContext
LOWnetworkx/conftest.py138CODE
LOWnetworkx/conftest.py145CODE
LOWnetworkx/conftest.py152CODE
LOWnetworkx/conftest.py159CODE
LOWnetworkx/conftest.py166CODE
LOWnetworkx/conftest.py173CODE
LOWnetworkx/conftest.py183CODE
LOWnetworkx/convert.py161CODE
LOWnetworkx/__init__.py15CODE
LOWnetworkx/__init__.py17CODE
LOWnetworkx/__init__.py20CODE
LOWnetworkx/__init__.py20CODE
LOWnetworkx/__init__.py26CODE
LOWnetworkx/__init__.py27CODE
LOWnetworkx/__init__.py28CODE
LOWnetworkx/__init__.py30CODE
LOWnetworkx/__init__.py31CODE
LOWnetworkx/__init__.py33CODE
LOWnetworkx/__init__.py34CODE
LOWnetworkx/__init__.py36CODE
LOWnetworkx/__init__.py37CODE
LOWnetworkx/__init__.py39CODE
LOWnetworkx/__init__.py40CODE
LOWnetworkx/__init__.py42CODE
LOWnetworkx/__init__.py43CODE
LOWnetworkx/__init__.py46CODE
LOWnetworkx/__init__.py47CODE
LOWnetworkx/__init__.py49CODE
LOWnetworkx/__init__.py50CODE
LOWnetworkx/__init__.py52CODE
LOWnetworkx/__init__.py53CODE
LOWnetworkx/readwrite/__init__.py6CODE
LOWnetworkx/readwrite/__init__.py7CODE
LOWnetworkx/readwrite/__init__.py8CODE
LOWnetworkx/readwrite/__init__.py9CODE
LOWnetworkx/readwrite/__init__.py10CODE
LOWnetworkx/readwrite/__init__.py11CODE
LOWnetworkx/readwrite/__init__.py12CODE
LOWnetworkx/readwrite/__init__.py13CODE
LOWnetworkx/readwrite/__init__.py14CODE
LOWnetworkx/readwrite/__init__.py15CODE
LOWnetworkx/readwrite/__init__.py16CODE
LOWnetworkx/readwrite/__init__.py17CODE
LOWnetworkx/readwrite/json_graph/__init__.py16CODE
LOWnetworkx/readwrite/json_graph/__init__.py17CODE
LOWnetworkx/readwrite/json_graph/__init__.py18CODE
LOWnetworkx/readwrite/json_graph/__init__.py19CODE
LOWnetworkx/readwrite/tests/test_graphml.py1103CODE
LOWnetworkx/drawing/__init__.py3CODE
LOWnetworkx/drawing/__init__.py4CODE
LOWnetworkx/drawing/__init__.py5CODE
LOWnetworkx/drawing/__init__.py6CODE
LOWnetworkx/drawing/__init__.py7CODE
LOWnetworkx/drawing/nx_pylab.py1483CODE
LOWnetworkx/drawing/nx_pylab.py1953CODE
LOWnetworkx/drawing/nx_pylab.py1954CODE
LOWnetworkx/drawing/nx_pylab.py2959CODE
LOWnetworkx/drawing/nx_pylab.py2960CODE
LOWnetworkx/drawing/nx_pylab.py1627CODE
LOWnetworkx/drawing/nx_pylab.py1551CODE
358 more matches not shown…
Deep Nesting275 hits · 273 pts
SeverityFileLineSnippetContext
LOWnetworkx/relabel.py135CODE
LOWnetworkx/relabel.py198CODE
LOWnetworkx/relabel.py232CODE
LOWnetworkx/convert.py34CODE
LOWnetworkx/convert.py213CODE
LOWnetworkx/convert.py253CODE
LOWnetworkx/convert.py374CODE
LOWnetworkx/convert_matrix.py496CODE
LOWnetworkx/convert_matrix.py893CODE
LOWnetworkx/readwrite/gexf.py440CODE
LOWnetworkx/readwrite/gexf.py508CODE
LOWnetworkx/readwrite/gexf.py710CODE
LOWnetworkx/readwrite/gexf.py1038CODE
LOWnetworkx/readwrite/gexf.py441CODE
LOWnetworkx/readwrite/gml.py298CODE
LOWnetworkx/readwrite/gml.py528CODE
LOWnetworkx/readwrite/gml.py629CODE
LOWnetworkx/readwrite/gml.py301CODE
LOWnetworkx/readwrite/gml.py377CODE
LOWnetworkx/readwrite/gml.py553CODE
LOWnetworkx/readwrite/gml.py714CODE
LOWnetworkx/readwrite/sparse6.py105CODE
LOWnetworkx/readwrite/multiline_adjlist.py39CODE
LOWnetworkx/readwrite/multiline_adjlist.py196CODE
LOWnetworkx/readwrite/text.py73CODE
LOWnetworkx/readwrite/pajek.py167CODE
LOWnetworkx/readwrite/graphml.py506CODE
LOWnetworkx/readwrite/graphml.py961CODE
LOWnetworkx/readwrite/edgelist.py43CODE
LOWnetworkx/readwrite/edgelist.py177CODE
LOWnetworkx/readwrite/json_graph/adjacency.py8CODE
LOWnetworkx/readwrite/tests/test_text.py1672CODE
LOWnetworkx/drawing/layout.py1608CODE
LOWnetworkx/drawing/nx_agraph.py119CODE
LOWnetworkx/drawing/nx_pylab.py257CODE
LOWnetworkx/drawing/nx_pylab.py170CODE
LOWnetworkx/linalg/algebraicconnectivity.py256CODE
LOWnetworkx/linalg/attrmatrix.py55CODE
LOWnetworkx/linalg/attrmatrix.py147CODE
LOWnetworkx/linalg/attrmatrix.py312CODE
LOWnetworkx/classes/graph.py2012CODE
LOWnetworkx/classes/multigraph.py538CODE
LOWnetworkx/classes/reportviews.py1089CODE
LOWnetworkx/classes/reportviews.py1502CODE
LOWnetworkx/classes/function.py621CODE
LOWnetworkx/classes/function.py760CODE
LOWnetworkx/classes/function.py797CODE
LOWnetworkx/classes/function.py979CODE
LOWnetworkx/classes/function.py1308CODE
LOWnetworkx/classes/tests/dispatch_interface.py67CODE
LOWnetworkx/algorithms/planarity.py449CODE
LOWnetworkx/algorithms/planarity.py502CODE
LOWnetworkx/algorithms/planarity.py535CODE
LOWnetworkx/algorithms/planarity.py584CODE
LOWnetworkx/algorithms/planarity.py694CODE
LOWnetworkx/algorithms/planarity.py1009CODE
LOWnetworkx/algorithms/planarity.py1084CODE
LOWnetworkx/algorithms/bridges.py146CODE
LOWnetworkx/algorithms/regular.py76CODE
LOWnetworkx/algorithms/smallworld.py28CODE
215 more matches not shown…
Modern Structural Boilerplate262 hits · 261 pts
SeverityFileLineSnippetContext
LOWnetworkx/exception.py9__all__ = [CODE
LOWnetworkx/relabel.py3__all__ = ["convert_node_labels_to_integers", "relabel_nodes"]CODE
LOWnetworkx/convert.py23__all__ = [CODE
LOWnetworkx/convert_matrix.py33__all__ = [CODE
LOWnetworkx/lazy_imports.py8__all__ = ["attach", "_lazy_import"]CODE
LOWnetworkx/readwrite/gexf.py33__all__ = ["write_gexf", "read_gexf", "relabel_gexf_graph", "generate_gexf"]CODE
LOWnetworkx/readwrite/gml.py42__all__ = ["read_gml", "parse_gml", "generate_gml", "write_gml"]CODE
LOWnetworkx/readwrite/sparse6.py19__all__ = ["from_sparse6_bytes", "read_sparse6", "to_sparse6_bytes", "write_sparse6"]CODE
LOWnetworkx/readwrite/multiline_adjlist.py28__all__ = [CODE
LOWnetworkx/readwrite/leda.py14__all__ = ["read_leda", "parse_leda"]CODE
LOWnetworkx/readwrite/graph6.py19__all__ = ["from_graph6_bytes", "read_graph6", "to_graph6_bytes", "write_graph6"]CODE
LOWnetworkx/readwrite/text.py11__all__ = ["generate_network_text", "write_network_text"]CODE
LOWnetworkx/readwrite/adjlist.py25__all__ = ["generate_adjlist", "write_adjlist", "parse_adjlist", "read_adjlist"]CODE
LOWnetworkx/readwrite/pajek.py22__all__ = ["read_pajek", "parse_pajek", "generate_pajek", "write_pajek"]CODE
LOWnetworkx/readwrite/graphml.py50__all__ = [CODE
LOWnetworkx/readwrite/edgelist.py30__all__ = [CODE
LOWnetworkx/readwrite/json_graph/tree.py3__all__ = ["tree_data", "tree_graph"]CODE
LOWnetworkx/readwrite/json_graph/cytoscape.py3__all__ = ["cytoscape_data", "cytoscape_graph"]CODE
LOWnetworkx/readwrite/json_graph/node_link.py5__all__ = ["node_link_data", "node_link_graph"]CODE
LOWnetworkx/readwrite/json_graph/adjacency.py3__all__ = ["adjacency_data", "adjacency_graph"]CODE
LOWnetworkx/drawing/nx_latex.py132__all__ = [STRING
LOWnetworkx/drawing/layout.py22__all__ = [CODE
LOWnetworkx/drawing/nx_pydot.py28__all__ = [CODE
LOWnetworkx/drawing/nx_agraph.py25__all__ = [CODE
LOWnetworkx/drawing/nx_pylab.py27__all__ = [CODE
LOWnetworkx/linalg/algebraicconnectivity.py12__all__ = [CODE
LOWnetworkx/linalg/bethehessianmatrix.py6__all__ = ["bethe_hessian_matrix"]CODE
LOWnetworkx/linalg/laplacianmatrix.py14__all__ = [CODE
LOWnetworkx/linalg/modularitymatrix.py6__all__ = ["modularity_matrix", "directed_modularity_matrix"]CODE
LOWnetworkx/linalg/spectrum.py7__all__ = [CODE
LOWnetworkx/linalg/graphmatrix.py7__all__ = ["incidence_matrix", "adjacency_matrix"]CODE
LOWnetworkx/linalg/attrmatrix.py7__all__ = ["attr_matrix", "attr_sparse_matrix"]CODE
LOWnetworkx/classes/coreviews.py8__all__ = [CODE
LOWnetworkx/classes/graph.py19__all__ = ["Graph"]CODE
LOWnetworkx/classes/multigraph.py12__all__ = ["MultiGraph"]CODE
LOWnetworkx/classes/reportviews.py199__all__ = [CODE
LOWnetworkx/classes/multidigraph.py19__all__ = ["MultiDiGraph"]CODE
LOWnetworkx/classes/digraph.py18__all__ = ["DiGraph"]CODE
LOWnetworkx/classes/filters.py6__all__ = [CODE
LOWnetworkx/classes/function.py9__all__ = [CODE
LOWnetworkx/classes/graphviews.py38__all__ = ["generic_graph_view", "subgraph_view", "reverse_view"]CODE
LOWnetworkx/algorithms/richclub.py8__all__ = ["rich_club_coefficient"]CODE
LOWnetworkx/algorithms/wiener.py22__all__ = ["wiener_index", "schultz_index", "gutman_index", "hyper_wiener_index"]CODE
LOWnetworkx/algorithms/boundary.py16__all__ = ["edge_boundary", "node_boundary"]CODE
LOWnetworkx/algorithms/planarity.py6__all__ = ["check_planarity", "is_planar", "PlanarEmbedding"]CODE
LOWnetworkx/algorithms/bridges.py8__all__ = ["bridges", "has_bridges", "local_bridges"]CODE
LOWnetworkx/algorithms/chains.py6__all__ = ["chain_decomposition"]CODE
LOWnetworkx/algorithms/regular.py6__all__ = ["is_regular", "is_k_regular", "k_factor"]CODE
LOWnetworkx/algorithms/smallworld.py21__all__ = ["random_reference", "lattice_reference", "sigma", "omega"]CODE
LOWnetworkx/algorithms/sparsifiers.py8__all__ = ["spanner"]CODE
LOWnetworkx/algorithms/similarity.py24__all__ = [CODE
LOWnetworkx/algorithms/clique.py17__all__ = [CODE
LOWnetworkx/algorithms/dominating.py8__all__ = [CODE
LOWnetworkx/algorithms/moral.py8__all__ = ["moral_graph"]CODE
LOWnetworkx/algorithms/lowest_common_ancestors.py10__all__ = [CODE
LOWnetworkx/algorithms/structuralholes.py5__all__ = ["constraint", "local_constraint", "effective_size"]CODE
LOWnetworkx/algorithms/swap.py8__all__ = ["double_edge_swap", "connected_double_edge_swap", "directed_edge_swap"]CODE
LOWnetworkx/algorithms/dominance.py10__all__ = ["immediate_dominators", "dominance_frontiers"]CODE
LOWnetworkx/algorithms/communicability_alg.py8__all__ = ["communicability", "communicability_exp"]CODE
LOWnetworkx/algorithms/hybrid.py11__all__ = ["kl_connected_subgraph", "is_kl_connected"]CODE
202 more matches not shown…
Self-Referential Comments73 hits · 196 pts
SeverityFileLineSnippetContext
MEDIUMnetworkx/convert_matrix.py861 # Create an iterable over (u, v, w) triples and for each triple, add anSTRING
MEDIUMnetworkx/readwrite/tests/test_text.py11 # Create a directed forest with labelsCOMMENT
MEDIUMnetworkx/readwrite/tests/test_text.py225 # Create a directed forestCOMMENT
MEDIUMnetworkx/readwrite/tests/test_text.py1375 # Create a directed forest with labelsCOMMENT
MEDIUMnetworkx/drawing/nx_pylab.py1346 # Create a set with all valid keywords across the three functions andSTRING
MEDIUMnetworkx/drawing/tests/test_agraph.py64 # Create an AGraph from an existing (non-multi) GraphCOMMENT
MEDIUM…workx/drawing/tests/test_image_comparison_pylab_mpl.py173 # Create a list of edges in the shortest pathCOMMENT
MEDIUMnetworkx/drawing/tests/test_pylab.py1200 # Create a single axis object to get consistent pixel coords acrossCOMMENT
MEDIUMnetworkx/drawing/tests/test_pylab.py1247 # Create a single axis object to get consistent pixel coords acrossCOMMENT
MEDIUMnetworkx/linalg/spectrum.py48 >>> G = nx.Graph() # Create a graph with 5 nodes and 3 connected componentsSTRING
MEDIUMnetworkx/classes/graph.py1829 # Create a subgraph SG based on a (possibly multigraph) GSTRING
MEDIUMnetworkx/classes/tests/test_multidigraph.py399 # Create a quadruply-linked path graph on five nodes.COMMENT
MEDIUMnetworkx/classes/tests/test_multigraph.py413 # Create a doubly-linked path graph on five nodes.COMMENT
MEDIUMnetworkx/classes/tests/dispatch_interface.py1# This file contains utilities for testing the dispatching featureCOMMENT
MEDIUMnetworkx/classes/tests/test_graph.py860 # Create a path graph on five nodes.COMMENT
MEDIUMnetworkx/classes/tests/test_subgraphviews.py276 # Create a path graph on five nodes.COMMENT
MEDIUMnetworkx/classes/tests/test_digraph.py307 # Create a doubly-linked path graph on five nodes.COMMENT
MEDIUMnetworkx/algorithms/richclub.py118 # Create a sorted list of pairs of edge endpoint degrees.STRING
MEDIUMnetworkx/algorithms/chains.py85 # Create a directed graph from the depth-first search tree withCOMMENT
MEDIUMnetworkx/algorithms/chains.py149 # Create a directed version of H that has the DFS edges directedCOMMENT
MEDIUMnetworkx/algorithms/chains.py169 # Create the cycle or cycle prefix starting with theCOMMENT
MEDIUMnetworkx/algorithms/node_classification.py1"""This module provides the functions for node classification problem.STRING
MEDIUMnetworkx/algorithms/tree/branchings.py543 # Create a new graph of the same class as the input graphCOMMENT
MEDIUMnetworkx/algorithms/isomorphism/vf2pp.py573 # Create the labels dicts based on node_label and default_labelCOMMENT
MEDIUMnetworkx/algorithms/isomorphism/vf2pp.py578 # Create the degree dicts based on graph typeCOMMENT
MEDIUMnetworkx/algorithms/link_analysis/pagerank_alg.py136 # Create a copy in (right) stochastic formCOMMENT
MEDIUMnetworkx/algorithms/connectivity/disjoint_paths.py7# Define the default maximum flow function to use for the underlyingCOMMENT
MEDIUMnetworkx/algorithms/connectivity/connectivity.py10# Define the default maximum flow function to use in all flow basedCOMMENT
MEDIUMnetworkx/algorithms/connectivity/edge_kcomponents.py376 # This class is a container the holds the auxiliary graph A andSTRING
MEDIUMnetworkx/algorithms/connectivity/edge_kcomponents.py408 # Create a relevant graph with the auxiliary edges with weights >= kSTRING
MEDIUMnetworkx/algorithms/connectivity/edge_kcomponents.py444 # Create a relevant graph with the auxiliary edges with weights >= kSTRING
MEDIUMnetworkx/algorithms/connectivity/kcomponents.py11# Define the default maximum flow function.COMMENT
MEDIUMnetworkx/algorithms/connectivity/cuts.py9# Define the default maximum flow function to use in all flow basedCOMMENT
MEDIUMnetworkx/algorithms/approximation/steinertree.py107 # Create a complete graph H from the metric edgesCOMMENT
MEDIUMnetworkx/algorithms/approximation/steinertree.py130 # Create an iterator over each edge in each shortest path; repeats are okayCOMMENT
MEDIUMnetworkx/algorithms/approximation/traveling_salesman.py465 # Create the undirected support of z_starCOMMENT
MEDIUMnetworkx/algorithms/approximation/traveling_salesman.py472 # Create the exponential distribution of spanning treesCOMMENT
MEDIUMnetworkx/algorithms/approximation/traveling_salesman.py577 # Create a copy of G without vertex 1.COMMENT
MEDIUMnetworkx/algorithms/approximation/traveling_salesman.py885 # Create the laplacian matricesCOMMENT
MEDIUM…kx/algorithms/approximation/tests/test_vertex_cover.py17 # Create a star graph in which half the nodes are directed inCOMMENT
MEDIUM…/algorithms/approximation/tests/test_dominating_set.py36 # Create a star graph in which the center node has the highestCOMMENT
MEDIUMnetworkx/algorithms/tests/test_dag.py51 # Create the directed path graph on four nodes in a diamond shape,COMMENT
MEDIUMnetworkx/algorithms/tests/test_core.py44 # Create the graph H resulting from the degree sequenceCOMMENT
MEDIUMnetworkx/algorithms/tests/test_matching.py536 # Create the path graph with two self-loops.COMMENT
MEDIUMnetworkx/algorithms/bipartite/matrix.py191 # Create an iterable over (u, v, w) triples and for each triple, add anSTRING
MEDIUMnetworkx/algorithms/bipartite/__init__.py1r"""This module provides functions and operations for bipartiteCODE
MEDIUMnetworkx/algorithms/bipartite/tests/test_matching.py160 # Create a bipartite graph based on the transitive closure of GCOMMENT
MEDIUMnetworkx/algorithms/shortest_paths/tests/test_astar.py234 # Create the cycle graph on four nodes, with nodes representedCOMMENT
MEDIUM…workx/algorithms/shortest_paths/tests/test_weighted.py363 # Create a triangle in which the edge from node 0 to node 2 hasCOMMENT
MEDIUM…workx/algorithms/shortest_paths/tests/test_weighted.py429 # Create a triangle in which the edge from node 0 to node 2 hasCOMMENT
MEDIUMnetworkx/algorithms/community/label_propagation.py268 # Create a unique label for each node in the graphCOMMENT
MEDIUMnetworkx/algorithms/flow/maxflow.py14# Define the default flow function for computing maximum flow.COMMENT
MEDIUMnetworkx/generators/social.py47 # Create the set of all members, and the members of each club.COMMENT
MEDIUMnetworkx/generators/geometric.py1021 # Create an edge with a certain connection probabilitySTRING
MEDIUMnetworkx/generators/line.py141 # Create a graph specific edge function.STRING
MEDIUMnetworkx/generators/trees.py496# The following functions support generation of unlabeled trees and forests.COMMENT
MEDIUMexamples/3d_drawing/plot_3d_animation_walk.py21# Define a graph to plot.COMMENT
MEDIUMexamples/3d_drawing/plot_basic.py24# Create the 3D figureCOMMENT
MEDIUMexamples/3d_drawing/plot_3d_animation_basic.py19# Define a graph to plot.COMMENT
MEDIUMexamples/drawing/plot_ego_graph.py15# Create a BA model graph - use seed for reproducibilityCOMMENT
13 more matches not shown…
Cross-File Repetition29 hits · 145 pts
SeverityFileLineSnippetContext
HIGHnetworkx/classes/graph.py0graph adjacency object holding the successors of each node. this object is a read-only dict-like structure with node keySTRING
HIGHnetworkx/classes/digraph.py0graph adjacency object holding the successors of each node. this object is a read-only dict-like structure with node keySTRING
HIGHnetworkx/classes/multidigraph.py0graph adjacency object holding the successors of each node. this object is a read-only dict-like structure with node keySTRING
HIGHnetworkx/classes/graph.py0remove all edges specified in ebunch. parameters ---------- ebunch: list or container of edge tuples each pair of half-eSTRING
HIGHnetworkx/classes/digraph.py0remove all edges specified in ebunch. parameters ---------- ebunch: list or container of edge tuples each pair of half-eSTRING
HIGHnetworkx/algorithms/planarity.py0remove all edges specified in ebunch. parameters ---------- ebunch: list or container of edge tuples each pair of half-eSTRING
HIGHnetworkx/classes/graph.py0returns true if graph is a multigraph, false otherwise.STRING
HIGHnetworkx/classes/multigraph.py0returns true if graph is a multigraph, false otherwise.STRING
HIGHnetworkx/classes/multidigraph.py0returns true if graph is a multigraph, false otherwise.STRING
HIGHnetworkx/classes/digraph.py0returns true if graph is a multigraph, false otherwise.STRING
HIGHnetworkx/classes/graph.py0returns true if graph is directed, false otherwise.STRING
HIGHnetworkx/classes/multigraph.py0returns true if graph is directed, false otherwise.STRING
HIGHnetworkx/classes/multidigraph.py0returns true if graph is directed, false otherwise.STRING
HIGHnetworkx/classes/digraph.py0returns true if graph is directed, false otherwise.STRING
HIGHnetworkx/classes/tests/test_multigraph.py0tests that adding a node to the original graph does not affect the nodes of the subgraph.STRING
HIGHnetworkx/classes/tests/test_graph.py0tests that adding a node to the original graph does not affect the nodes of the subgraph.STRING
HIGHnetworkx/classes/tests/test_subgraphviews.py0tests that adding a node to the original graph does not affect the nodes of the subgraph.STRING
HIGHnetworkx/classes/tests/test_multigraph.py0tests that the node attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_graph.py0tests that the node attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_subgraphviews.py0tests that the node attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_multigraph.py0tests that the edge attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_graph.py0tests that the edge attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_subgraphviews.py0tests that the edge attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_multigraph.py0tests that the graph attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_graph.py0tests that the graph attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/classes/tests/test_subgraphviews.py0tests that the graph attribute dictionary of the two graphs is the same object.STRING
HIGHnetworkx/algorithms/flow/dinitz_alg.py0find a maximum single-commodity flow using the edmonds-karp algorithm. this function returns the residual network resultSTRING
HIGHnetworkx/algorithms/flow/shortestaugmentingpath.py0find a maximum single-commodity flow using the edmonds-karp algorithm. this function returns the residual network resultSTRING
HIGHnetworkx/algorithms/flow/edmondskarp.py0find a maximum single-commodity flow using the edmonds-karp algorithm. this function returns the residual network resultSTRING
Decorative Section Separators42 hits · 123 pts
SeverityFileLineSnippetContext
MEDIUMnetworkx/drawing/nx_pylab.py2102 # ---------------------------------------STRING
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py10# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py12# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py132# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py134# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py188# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py190# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py422# ----------------COMMENT
MEDIUM…algorithms/connectivity/tests/test_edge_kcomponents.py424# ----------------COMMENT
MEDIUMnetworkx/algorithms/tests/test_max_weight_clique.py168# --------------------------------------------------------------------------COMMENT
MEDIUMnetworkx/algorithms/coloring/tests/test_coloring.py785# --------------------------------------------------------------------------COMMENT
MEDIUMnetworkx/algorithms/coloring/tests/test_coloring.py797# --------------------------------------------------------------------------COMMENT
MEDIUMnetworkx/algorithms/coloring/tests/test_coloring.py829# --------------------------------------------------------------------------COMMENT
MEDIUMnetworkx/generators/classic.py45# -------------------------------------------------------------------COMMENT
MEDIUMnetworkx/generators/classic.py47# -------------------------------------------------------------------COMMENT
MEDIUMnetworkx/generators/small.py141# -------------------------------------------------------------------------------COMMENT
MEDIUMnetworkx/generators/small.py143# -------------------------------------------------------------------------------COMMENT
MEDIUMexamples/3d_drawing/plot_3d_animation_walk.py22# -----------------------COMMENT
MEDIUMexamples/3d_drawing/plot_3d_animation_walk.py33# -------------------------------------------COMMENT
MEDIUMexamples/3d_drawing/plot_3d_animation_basic.py20# -----------------------COMMENT
MEDIUMexamples/3d_drawing/plot_3d_animation_basic.py31# ----------------------------COMMENT
MEDIUM…ms/plot_image_segmentation_spectral_graph_partition.py27# -----------------------------------------COMMENT
MEDIUM…ms/plot_image_segmentation_spectral_graph_partition.py52# ---------------------------------COMMENT
MEDIUM…ms/plot_image_segmentation_spectral_graph_partition.py66# --------------------------------------------------COMMENT
MEDIUM…ms/plot_image_segmentation_spectral_graph_partition.py92# -------------------------------COMMENT
MEDIUM…ms/plot_image_segmentation_spectral_graph_partition.py140# --------------------------------COMMENT
MEDIUMexamples/algorithms/plot_circuits.py60# ----------------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py81# ---------------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py108# ------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py122# ------------------------------------------------------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py128# ---------------------------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py143# ---------------------------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py154# --------------------------------------------------------------------------COMMENT
MEDIUMexamples/algorithms/plot_subgraphs.py160# -----------------------------COMMENT
MEDIUMexamples/algorithms/plot_beam_search.py75# ---------------------------------------COMMENT
MEDIUMexamples/external/plot_hiveplotlib.py26# ----------------------------------COMMENT
MEDIUMexamples/external/plot_hiveplotlib.py46# --------------COMMENT
MEDIUMexamples/external/plot_igraph.py16# ------------------COMMENT
MEDIUMexamples/external/plot_igraph.py46# ------------------COMMENT
MEDIUMdoc/conf.py12# ---------------------COMMENT
MEDIUMdoc/conf.py133# -----------------------STRING
MEDIUMdoc/conf.py213# ------------------------STRING
Over-Commented Block61 hits · 58 pts
SeverityFileLineSnippetContext
LOWnetworkx/convert_matrix.py861 # Create an iterable over (u, v, w) triples and for each triple, add anCOMMENT
LOWnetworkx/readwrite/text.py341 # (1) children to traverse into after showing this node.COMMENT
LOWnetworkx/drawing/layout.py681COMMENT
LOWnetworkx/linalg/attrmatrix.py121 else:COMMENT
LOWnetworkx/algorithms/chains.py81COMMENT
LOWnetworkx/algorithms/chains.py141 visited.add(v)COMMENT
LOWnetworkx/algorithms/distance_regular.py261 # Here is an alternate implementation based directly on theCOMMENT
LOWnetworkx/algorithms/matching.py381 # The algorithm is taken from "Efficient Algorithms for Finding MaximumCOMMENT
LOWnetworkx/algorithms/matching.py441 mate = {}COMMENT
LOWnetworkx/algorithms/matching.py461COMMENT
LOWnetworkx/algorithms/matching.py481 # If b is a (possibly trivial) top-level S-blossom,COMMENT
LOWnetworkx/algorithms/cycles.py601 # must not construct longer cycles along (u, v).COMMENT
LOWnetworkx/algorithms/tree/branchings.py281 # These are the buckets from the paper.COMMENT
LOWnetworkx/algorithms/tree/branchings.py301COMMENT
LOWnetworkx/algorithms/tree/branchings.py521COMMENT
LOWnetworkx/algorithms/tree/mst.py101 minwt = wtCOMMENT
LOWnetworkx/algorithms/tree/mst.py121 # component was empty, so that part of the forest has beenCOMMENT
LOWnetworkx/algorithms/tree/mst.py841 # The result is a MultiGraph version of G so that parallel edges areCOMMENT
LOWnetworkx/algorithms/tree/mst.py901 # There are two cases for the total spanning tree additive weight.COMMENT
LOWnetworkx/algorithms/tree/tests/test_mst.py621 # expect to see each tree. This test uses a near minimum sample size whereCOMMENT
LOWnetworkx/algorithms/tree/tests/test_mst.py741COMMENT
LOWnetworkx/algorithms/isomorphism/tree_isomorphism.py141 # each node has a label, initially set to 0COMMENT
LOWnetworkx/algorithms/isomorphism/isomorphvf2.py501 This function returns True if it is adding the candidate pairCOMMENT
LOWnetworkx/algorithms/isomorphism/isomorphvf2.py701 # core_1[n] contains the index of the node paired with n, which is m,COMMENT
LOWnetworkx/algorithms/isomorphism/isomorphvf2.py741 # Basically, when we test the look-ahead rules R_pred and R_succ, weCOMMENT
LOWnetworkx/algorithms/isomorphism/vf2pp.py481COMMENT
LOWnetworkx/algorithms/isomorphism/tests/test_common.py41# vf2pp_subgraph_isomorphism()COMMENT
LOWnetworkx/algorithms/isomorphism/tests/test_ismags.py101 id="katebi-paper-fig2",COMMENT
LOWnetworkx/algorithms/connectivity/edge_augmentation.py761 >>> G = nx.Graph([(0, 1), (0, 2), (1, 2)])COMMENT
LOWnetworkx/algorithms/connectivity/edge_augmentation.py941COMMENT
LOWnetworkx/algorithms/connectivity/kcutsets.py141 # and step 5: build the associated residual network RCOMMENT
LOW…orithms/approximation/tests/test_traveling_salesman.py781 )COMMENT
LOW…kx/algorithms/centrality/tests/test_load_centrality.py261 for n in sorted(G):COMMENT
LOWnetworkx/algorithms/tests/test_cycles.py621 }COMMENT
LOWnetworkx/algorithms/tests/test_dag.py781 # # Determine the root node of the branching.COMMENT
LOWnetworkx/algorithms/tests/test_richclub.py141# T = nx.balanced_tree(2,10)COMMENT
LOWnetworkx/algorithms/tests/test_wiener.py21 # In P_n, there are n - 1 pairs of vertices at distance one, n -COMMENT
LOWnetworkx/algorithms/bipartite/matching.py281 # for u in G:COMMENT
LOWnetworkx/algorithms/traversal/beamsearch.py81 #COMMENT
LOWnetworkx/algorithms/community/tests/test_quality.py481 # (0,1)=2, (1,2)=3, (0,2)=1COMMENT
LOWnetworkx/algorithms/flow/utils.py121 ]COMMENT
LOWnetworkx/algorithms/flow/tests/test_maxflow.py121 # HCOMMENT
LOWnetworkx/algorithms/flow/tests/test_maxflow.py401 # flow solution using capacity=my_capCOMMENT
LOWnetworkx/utils/backends.py1# Notes about NetworkX namespace objects set up here:COMMENT
LOWnetworkx/utils/backends.py821 # ##########################COMMENT
LOWnetworkx/utils/backends.py841 # `backend_priority` before running with the default "networkx" implementation.COMMENT
LOWnetworkx/utils/backends.py861 # +-------+-------+COMMENT
LOWnetworkx/utils/backends.py901 group3 = graph_backend_names - seenCOMMENT
LOWnetworkx/utils/decorators.py961COMMENT
LOWnetworkx/generators/expanders.py21#COMMENT
LOWnetworkx/generators/atlas.py21#: This is the absolute path of the gzipped text file containing theCOMMENT
LOWnetworkx/generators/atlas.py41#: import gzipCOMMENT
LOWexamples/algorithms/plot_subgraphs.py141###############################################################################COMMENT
LOWexamples/algorithms/plot_beam_search.py61 width = initial_width * pow(2, i)COMMENT
LOWexamples/external/plot_hiveplotlib.py41)COMMENT
LOWexamples/geospatial/plot_points.py21# are a format for storing geographic data that is backedCOMMENT
LOWexamples/geospatial/plot_polygons.py21# used as a file format for geographic data.COMMENT
LOWexamples/geospatial/plot_delaunay.py21# read in example data from a geopackage file. GeopackagesCOMMENT
LOWexamples/geospatial/plot_delaunay.py41# the bounding box of the point pattern. This is controlled by the "clip" argument.COMMENT
LOWdoc/conf.py101#COMMENT
1 more matches not shown…
Redundant / Tautological Comments39 hits · 44 pts
SeverityFileLineSnippetContext
LOWnetworkx/readwrite/gexf.py583 # Check if the type of the attribute value is consistent with the type of the attributeCOMMENT
LOWnetworkx/drawing/nx_pylab.py2034 # Check if edge_color is an array of floats and map to edge_cmap.STRING
LOWnetworkx/algorithms/planarity.py1114 # Check if opposite half-edge existsCOMMENT
LOWnetworkx/algorithms/chains.py145 # Check if the root is in the graph G. If not, raise NodeNotFoundCOMMENT
LOWnetworkx/algorithms/smallworld.py108 # Check if the graph is still connectedCOMMENT
LOWnetworkx/algorithms/smallworld.py232 # Check if the graph is still connectedCOMMENT
LOWnetworkx/algorithms/similarity.py1583 # Check if k is provided and validate it against the number of nodesCOMMENT
LOWnetworkx/algorithms/dominating.py221 # Check if u's unseen-degree changed while in the heapSTRING
LOWnetworkx/algorithms/structuralholes.py149 # Check if scipy is availableSTRING
LOWnetworkx/algorithms/structuralholes.py265 # Check if scipy is availableSTRING
LOWnetworkx/algorithms/matching.py615 # Set label to S.COMMENT
LOWnetworkx/algorithms/graphical.py179 # Add back to the list any non-zero stubs that were removedSTRING
LOWnetworkx/algorithms/graphical.py261 if dk < k + 1: # Check if already past Durfee indexSTRING
LOWnetworkx/algorithms/graphical.py265 if dk < k + run_size: # Check if end of run is past Durfee indexSTRING
LOWnetworkx/algorithms/graphical.py469 # Check if target is now totally connectedSTRING
LOWnetworkx/algorithms/planar_drawing.py428 # Check if the face has already been calculatedCOMMENT
LOWnetworkx/algorithms/isomorphism/vf2pp.py493 # Check if SG and FG have the same labels, and check that theCOMMENT
LOW…workx/algorithms/isomorphism/tests/test_isomorphvf2.py370 # Check if StopIteration exception returns FalseCOMMENT
LOWnetworkx/algorithms/link_analysis/pagerank_alg.py269 # Assign dangling_weights to any dangling nodes (nodes with no out links)COMMENT
LOWnetworkx/algorithms/connectivity/kcutsets.py130 # Check if X is a k-node-cutsetSTRING
LOWnetworkx/algorithms/approximation/traveling_salesman.py933 # Check if the for loop terminated without changing any gammaCOMMENT
LOW…workx/algorithms/approximation/tests/test_treewidth.py24 # Check if each connected pair of nodes are at least once together in a bagCOMMENT
LOW…workx/algorithms/approximation/tests/test_treewidth.py33 # Check if the nodes associated with vertex v form a connected subset of TCOMMENT
LOWnetworkx/algorithms/tests/test_planar_drawing.py134 # Check if float numbers are basically equal, for python >=3.5 there isCOMMENT
LOWnetworkx/algorithms/tests/test_planar_drawing.py164 # Check if end points are differentCOMMENT
LOWnetworkx/algorithms/tests/test_planar_drawing.py181 # Check if intersection lies between the pointsCOMMENT
LOWnetworkx/algorithms/tests/test_planarity.py387 # Check if we can remove the nodeCOMMENT
LOWnetworkx/algorithms/assortativity/connectivity.py105 # Check if `source_nodes` is actually a single node in the graph.STRING
LOWnetworkx/algorithms/community/local.py113 # Check if nbr should be removed from boundary nodesCOMMENT
LOWnetworkx/algorithms/community/modularity_max.py199 # Check if replaced dq is row maxSTRING
LOWnetworkx/algorithms/community/modularity_max.py430 # Check if strictly better or tieSTRING
LOWnetworkx/utils/backends.py593 # Check if any graph comes from a backendCOMMENT
LOWnetworkx/utils/backends.py2059 # Iterate over the items in `cache` to see if any are compatible.COMMENT
LOWnetworkx/utils/mapped_queue.py252 # Set child_pos to index of smaller child.COMMENT
LOWnetworkx/generators/degree_seq.py525 # Add back to the list any nonzero stubs that were removedSTRING
LOWnetworkx/generators/degree_seq.py628 # Check if source is now totally connectedSTRING
LOWnetworkx/generators/community.py577 # Check if dimensions matchCOMMENT
LOWexamples/algorithms/plot_blockmodel.py70# Set positions to mean of positions of internal nodes from original graphCOMMENT
LOWexamples/algorithms/plot_greedy_coloring.py22# Assign colors to nodes based on the greedy coloringCOMMENT
AI Response Leakage5 hits · 41 pts
SeverityFileLineSnippetContext
HIGHnetworkx/algorithms/tree/branchings.py285 # consistent with G^i. In this implementation, D^i and E^i are storedCOMMENT
HIGH…orkx/algorithms/connectivity/tests/test_kcomponents.py120 # In this example graph there are 8 3-components, 4 with 15 nodesCOMMENT
HIGH…rkx/algorithms/approximation/tests/test_kcomponents.py237 # In this example graph there are 8 3-components, 4 with 15 nodesCOMMENT
HIGHnetworkx/generators/degree_seq.py115 # gives a random pairing of nodes. In this implementation, weCOMMENT
HIGHexamples/3d_drawing/plot_3d_animation_basic.py33# In this example, a frame update is only a rotation of a given 3D graph.COMMENT
AI Structural Patterns27 hits · 27 pts
SeverityFileLineSnippetContext
LOWnetworkx/readwrite/json_graph/node_link.py143CODE
LOWnetworkx/drawing/nx_latex.py140CODE
LOWnetworkx/drawing/nx_latex.py310CODE
LOWnetworkx/drawing/layout.py452CODE
LOWnetworkx/drawing/layout.py726CODE
LOWnetworkx/drawing/layout.py1472CODE
LOWnetworkx/drawing/layout.py1608CODE
LOWnetworkx/drawing/nx_pylab.py1373CODE
LOWnetworkx/drawing/nx_pylab.py1763CODE
LOWnetworkx/drawing/nx_pylab.py2138CODE
LOWnetworkx/drawing/nx_pylab.py2291CODE
LOWnetworkx/drawing/nx_pylab.py1606CODE
LOWnetworkx/algorithms/similarity.py39CODE
LOWnetworkx/algorithms/similarity.py211CODE
LOWnetworkx/algorithms/similarity.py387CODE
LOWnetworkx/algorithms/similarity.py540CODE
LOWnetworkx/algorithms/similarity.py1512CODE
LOWnetworkx/algorithms/similarity.py1768CODE
LOWnetworkx/algorithms/walks.py78CODE
LOWnetworkx/algorithms/isomorphism/vf2pp.py710CODE
LOWnetworkx/algorithms/isomorphism/vf2pp.py759CODE
LOWnetworkx/algorithms/approximation/traveling_salesman.py1050CODE
LOWnetworkx/algorithms/approximation/traveling_salesman.py1280CODE
LOW…orkx/algorithms/centrality/current_flow_betweenness.py26CODE
LOWnetworkx/utils/backends.py218CODE
LOWnetworkx/generators/geometric.py334CODE
LOWnetworkx/generators/community.py808CODE
Excessive Try-Catch Wrapping24 hits · 24 pts
SeverityFileLineSnippetContext
LOWnetworkx/convert.py90 except Exception as err:CODE
LOWnetworkx/convert.py99 except Exception as err1:CODE
LOWnetworkx/convert.py106 except Exception as err2:CODE
LOWnetworkx/convert.py120 except Exception as err:CODE
LOWnetworkx/convert.py131 except Exception as err:CODE
LOWnetworkx/convert.py139 except Exception as err:CODE
LOWnetworkx/convert.py152 except Exception as err:CODE
LOWnetworkx/convert.py166 except Exception as err:CODE
LOWnetworkx/convert.py180 except Exception as err:CODE
LOWnetworkx/convert_matrix.py212 except Exception as err:STRING
LOWnetworkx/convert_matrix.py1274 except Exception as err:STRING
LOWnetworkx/readwrite/gml.py413 except Exception:CODE
LOWnetworkx/readwrite/edgelist.py260 except Exception as err:CODE
LOWnetworkx/readwrite/edgelist.py276 except Exception as err:CODE
LOWnetworkx/readwrite/edgelist.py290 except Exception as err:CODE
LOWnetworkx/readwrite/tests/test_text.py1740 except Exception:CODE
LOWnetworkx/classes/multigraph.py375 except Exception as err:CODE
LOWnetworkx/classes/multidigraph.py366 except Exception as err:CODE
LOW…lgorithms/connectivity/tests/test_edge_augmentation.py385 except Exception:CODE
LOWnetworkx/utils/backends.py87 except Exception as exc:CODE
LOWnetworkx/utils/backends.py1447 except Exception:CODE
LOWnetworkx/utils/backends.py1467 except Exception:CODE
LOWnetworkx/utils/tests/test_decorators.py526 except Exception as e:CODE
LOWbenchmarks/benchmarks/utils.py86 except Exception as exc: # network/IO/parse failureCODE
AI Slop Vocabulary11 hits · 19 pts
SeverityFileLineSnippetContext
MEDIUMpyproject.toml400# the rattler backend (py-rattler/conda-forge) from this single harness env;COMMENT
MEDIUMnetworkx/classes/tests/dispatch_interface.py6# This is comprehensive, but only tests the `test_override_dispatch`COMMENT
LOWnetworkx/algorithms/threshold.py341 # if type is 'i' just add nodeaCOMMENT
LOWnetworkx/algorithms/centrality/reaching.py198 # If the graph is unweighted, simply return the proportion of nodesCOMMENT
LOWnetworkx/algorithms/bipartite/basic.py141 # this should maybe just return False?COMMENT
LOW…kx/algorithms/assortativity/tests/test_connectivity.py140 # just return the connectivity value itself?COMMENT
MEDIUMnetworkx/algorithms/community/lukes.py115 # - brevity: we can leverage global "safe_G"COMMENT
LOWnetworkx/algorithms/community/centrality.py123 # If the graph is already empty, simply return its connectedCOMMENT
LOWnetworkx/generators/line.py475 # in this case either triangle works, so just use TCOMMENT
LOWnetworkx/generators/harary_graph.py145 # In case of connectivity 1, simply return the path graph.STRING
LOWnetworkx/generators/random_graphs.py797 # For simplicity, if p == 0 or 1, just return BASTRING
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHbenchmarks/benchmarks/utils.py11Generate a string name for a graph-generating function and its arguments. This function takes a graph constructor (STRING
HIGHbenchmarks/benchmarks/utils.py47 Generate a graph using the given function and assign random edge weights. Parameters: weight_seed (intSTRING
Overly Generic Function Names3 hits · 2 pts
SeverityFileLineSnippetContext
LOWnetworkx/classes/tests/test_graphviews.py39 def my_method(self):CODE
LOWnetworkx/classes/tests/test_graphviews.py337 def my_method(self):CODE
LOWnetworkx/generators/random_graphs.py1382 def my_function(b):STRING
Verbosity Indicators1 hit · 0 pts
SeverityFileLineSnippetContext
LOWnetworkx/algorithms/isomorphism/vf2pp.py902 and node1 is mapped to node2. The purpose of this function is to avoid bruteSTRING