AI Slop Code RIsk Monitor

networkx/networkx

Network Analysis in Python

22.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for networkx/networkx, a Python project with 17,316 GitHub stars. SynthScan examined 209,482 lines of code across 750 source files, recording 3602 pattern matches distributed across 18 syntactic categories. The legacy adjusted pattern signal is 22.7 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

22.7
Adjusted Signal
22.7
Raw Pattern Score
100%
Time Factor
2026-10-06
Last Push
17.3K
Stars
Python
Language
209.5K
Lines of Code
750
Files
3.6K
Pattern Hits
2026-10-12
Scan Date
0.29
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 50.4/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 2643 finding(s).

Hallucinated Dependency & Supply Chain Risk 20.2/100 · LOW

Are imports declared and package/API names verified? 539 finding(s).

Agent Over-Engineering Ratio 53.0/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 2591 finding(s).

PR Review Velocity Impact 69.2/100 · HIGH

Which changes need focused human review? 3602 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 217MEDIUM 121LOW 3264

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 3602 distinct pattern matches across 18 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers2144 hits · 2264 pts
SeverityFileLineSnippetContext
LOWnetworkx/conftest.py79def pytest_collection_modifyitems(config, items):CODE
LOWnetworkx/relabel.py232def convert_node_labels_to_integers(CODE
LOWnetworkx/readwrite/gexf.py778 def alter_graph_mode_timeformat(self, start_or_end):STRING
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
LOW⚡networkx/readwrite/tests/test_graph6.py84 def test_large_complete_graph(self):CODE
LOW⚡networkx/readwrite/tests/test_graph6.py94 def test_complete_bipartite_graph(self):CODE
LOW⚡networkx/readwrite/tests/test_graph6.py102 def test_no_directed_or_multi_graphs(self, G):CODE
LOW⚡networkx/readwrite/tests/test_graph6.py152 def test_large_complete_graph(self):CODE
LOW⚡networkx/readwrite/tests/test_graph6.py160 def test_complete_bipartite_graph(self):CODE
LOW⚡networkx/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.py306 def test_unknown_attribute_class_raises(self, attributes_tag):STRING
LOWnetworkx/readwrite/tests/test_gexf.py365 def test_serialize_ints_to_strings(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py375 def test_write_with_node_attributes(self):STRING
LOWnetworkx/readwrite/tests/test_gexf.py559 def test_multigraph_with_missing_attributes(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py575 def test_missing_viz_attributes(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py657 def test_round_trip_mixed_type_float_to_string(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py669 def test_round_trip_mixed_type_int_to_string(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py681 def test_type_promotion_integer_to_integer(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py696 def test_type_promotion_float_to_float(self):CODE
LOWnetworkx/readwrite/tests/test_gexf.py711 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_p2g.py31def test_fn_import_from_module_deprecation():CODE
LOWnetworkx/readwrite/tests/test_pajek.py132 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
LOW⚡networkx/readwrite/tests/test_edgelist.py117def test_parse_edgelist_no_data(example_graph):CODE
LOW⚡networkx/readwrite/tests/test_edgelist.py124def test_parse_edgelist_with_data_dict(example_graph):CODE
LOW⚡networkx/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
LOW⚡networkx/readwrite/tests/test_adjlist.py270 def test_multiline_adjlist_graph(self, tmp_path):STRING
LOW⚡networkx/readwrite/tests/test_adjlist.py280 def test_multiline_adjlist_digraph(self, tmp_path):STRING
LOW⚡networkx/readwrite/tests/test_adjlist.py290 def test_multiline_adjlist_integers(self, tmp_path):STRING
2084 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
HIGH⚡networkx/algorithms/operators/tests/test_product.py20 G = nx.tensor_product(null, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py21 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py23 G = nx.tensor_product(null, empty10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py24 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py25 G = nx.tensor_product(null, K3)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py26 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py27 G = nx.tensor_product(null, K10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py28 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py29 G = nx.tensor_product(null, P3)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py30 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py31 G = nx.tensor_product(null, P10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py32 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py33 G = nx.tensor_product(empty10, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py34 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py35 G = nx.tensor_product(K3, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py36 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py37 G = nx.tensor_product(K10, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py38 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py39 G = nx.tensor_product(P3, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py40 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py41 G = nx.tensor_product(P10, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py42 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py138 G = nx.cartesian_product(null, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py139 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py141 G = nx.cartesian_product(null, empty10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py142 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py143 G = nx.cartesian_product(null, K3)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py144 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py145 G = nx.cartesian_product(null, K10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py146 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py147 G = nx.cartesian_product(null, P3)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py148 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py149 G = nx.cartesian_product(null, P10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py150 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py151 G = nx.cartesian_product(empty10, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py152 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py153 G = nx.cartesian_product(K3, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py154 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py155 G = nx.cartesian_product(K10, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py156 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py157 G = nx.cartesian_product(P3, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py158 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py159 G = nx.cartesian_product(P10, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py160 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py222 G = nx.lexicographic_product(null, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py223 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py225 G = nx.lexicographic_product(null, empty10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py226 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py227 G = nx.lexicographic_product(null, K3)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py228 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py229 G = nx.lexicographic_product(null, K10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py230 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py231 G = nx.lexicographic_product(null, P3)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py232 assert nx.is_isomorphic(G, null)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py233 G = nx.lexicographic_product(null, P10)CODE
HIGH⚡networkx/algorithms/operators/tests/test_product.py234 assert nx.is_isomorphic(G, null)CODE
58 more matches not shown…
Unused Imports421 hits · 358 pts
SeverityFileLineSnippetContext
LOWnetworkx/conftest.py144CODE
LOWnetworkx/conftest.py151CODE
LOWnetworkx/conftest.py158CODE
LOWnetworkx/conftest.py165CODE
LOWnetworkx/conftest.py172CODE
LOWnetworkx/conftest.py179CODE
LOWnetworkx/conftest.py189CODE
LOWnetworkx/conftest.py196CODE
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_p2g.py3CODE
LOWnetworkx/readwrite/tests/test_p2g.py38CODE
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
361 more matches not shown…
Empty Error Handlers63 hits · 315 pts
SeverityFileLineSnippetContext
HIGHnetworkx/convert.py142except ImportError:CODE
HIGHnetworkx/convert.py156except ImportError:CODE
HIGHnetworkx/convert.py170except ImportError:CODE
HIGHnetworkx/convert.py113except:CODE
HIGHnetworkx/lazy_imports.py162except:CODE
HIGHnetworkx/readwrite/gexf.py337except ImportError:CODE
HIGHnetworkx/readwrite/gexf.py480except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py486except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py492except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py539except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py544except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py549except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py555except KeyError:CODE
HIGHnetworkx/readwrite/gexf.py561except KeyError:CODE
HIGHnetworkx/readwrite/gml.py396except ValueError:CODE
HIGHnetworkx/readwrite/gml.py415except ValueError:CODE
HIGHnetworkx/readwrite/text.py689except StopIteration:CODE
HIGHnetworkx/readwrite/pajek.py226except ValueError:CODE
HIGHnetworkx/readwrite/pajek.py252except:CODE
HIGHnetworkx/readwrite/pajek.py282except:CODE
HIGHnetworkx/readwrite/graphml.py451except:CODE
HIGHnetworkx/readwrite/graphml.py988except ValueError: # Could not convert.CODE
HIGHnetworkx/readwrite/edgelist.py121except KeyError:CODE
HIGHnetworkx/drawing/nx_pydot.py176except (IndexError, TypeError):CODE
HIGHnetworkx/drawing/nx_pydot.py180except (IndexError, TypeError):CODE
HIGHnetworkx/drawing/nx_pydot.py221except KeyError:CODE
HIGHnetworkx/drawing/nx_pydot.py225except KeyError:CODE
HIGHnetworkx/classes/graph.py751except KeyError:CODE
HIGHnetworkx/classes/multigraph.py769except NetworkXError:CODE
HIGHnetworkx/classes/reportviews.py629except TypeError:CODE
HIGHnetworkx/classes/digraph.py672except KeyError:CODE
HIGHnetworkx/classes/function.py717except KeyError:CODE
HIGHnetworkx/classes/function.py708except KeyError:CODE
HIGHnetworkx/classes/function.py794except KeyError:CODE
HIGHnetworkx/classes/function.py927except KeyError:CODE
HIGHnetworkx/classes/function.py933except KeyError:CODE
HIGHnetworkx/classes/function.py1016except KeyError:CODE
HIGHnetworkx/classes/function.py909except KeyError:CODE
HIGHnetworkx/classes/function.py915except KeyError:CODE
HIGHnetworkx/algorithms/clique.py296except IndexError:CODE
HIGHnetworkx/algorithms/simple_paths.py560except nx.NetworkXNoPath:CODE
HIGHnetworkx/algorithms/tree/branchings.py987except nx.NetworkXException:CODE
HIGHnetworkx/algorithms/isomorphism/ismags.py150except AttributeError:CODE
HIGHnetworkx/algorithms/isomorphism/ismags.py1303except StopIteration:CODE
HIGHnetworkx/algorithms/approximation/traveling_salesman.py165except StopIteration:CODE
HIGHnetworkx/algorithms/bipartite/edgelist.py189except KeyError:CODE
HIGHnetworkx/algorithms/community/asyn_fluid.py106except KeyError:CODE
HIGHnetworkx/algorithms/community/asyn_fluid.py127except KeyError:CODE
HIGHnetworkx/algorithms/community/asyn_fluid.py142except KeyError:CODE
HIGHnetworkx/algorithms/coloring/equitable_coloring.py226except StopIteration:CODE
HIGHnetworkx/tests/test_lazy_imports.py19except ModuleNotFoundError:CODE
HIGHnetworkx/tests/test_lazy_imports.py26except ModuleNotFoundError:CODE
HIGHnetworkx/tests/test_lazy_imports.py58except ModuleNotFoundError:CODE
HIGHnetworkx/tests/test_lazy_imports.py64except ModuleNotFoundError:CODE
HIGHnetworkx/utils/misc.py508except ImportError:CODE
HIGHnetworkx/utils/misc.py125except KeyError:CODE
HIGHnetworkx/generators/degree_seq.py770except nx.NetworkXUnfeasible:CODE
HIGHexamples/geospatial/plot_points.py56except:CODE
HIGHexamples/geospatial/plot_lines.py80except:CODE
HIGHexamples/geospatial/plot_lines.py99except:CODE
3 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.py508CODE
LOWnetworkx/readwrite/gexf.py576CODE
LOWnetworkx/readwrite/gexf.py778CODE
LOWnetworkx/readwrite/gexf.py1106CODE
LOWnetworkx/readwrite/gexf.py509CODE
LOWnetworkx/readwrite/gml.py303CODE
LOWnetworkx/readwrite/gml.py533CODE
LOWnetworkx/readwrite/gml.py634CODE
LOWnetworkx/readwrite/gml.py306CODE
LOWnetworkx/readwrite/gml.py382CODE
LOWnetworkx/readwrite/gml.py558CODE
LOWnetworkx/readwrite/gml.py719CODE
LOWnetworkx/readwrite/sparse6.py105CODE
LOWnetworkx/readwrite/multiline_adjlist.py39CODE
LOWnetworkx/readwrite/multiline_adjlist.py224CODE
LOWnetworkx/readwrite/text.py73CODE
LOWnetworkx/readwrite/pajek.py193CODE
LOWnetworkx/readwrite/graphml.py546CODE
LOWnetworkx/readwrite/graphml.py1001CODE
LOWnetworkx/readwrite/edgelist.py43CODE
LOWnetworkx/readwrite/edgelist.py218CODE
LOWnetworkx/readwrite/json_graph/adjacency.py8CODE
LOWnetworkx/readwrite/tests/test_text.py1672CODE
LOWnetworkx/drawing/layout.py1611CODE
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/multigraph.py538CODE
LOWnetworkx/classes/reportviews.py1172CODE
LOWnetworkx/classes/reportviews.py1604CODE
LOWnetworkx/classes/function.py621CODE
LOWnetworkx/classes/function.py760CODE
LOWnetworkx/classes/function.py800CODE
LOWnetworkx/classes/function.py982CODE
LOWnetworkx/classes/function.py1315CODE
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
LOWnetworkx/algorithms/smallworld.py124CODE
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.py261__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.py200__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 Comments76 hits · 198 pts
SeverityFileLineSnippetContext
MEDIUMnetworkx/convert_matrix.py861 # Create an iterable over (u, v, w) triples and for each triple, add anSTRING
MEDIUMnetworkx/readwrite/edgelist.py413 >>> with open(fpath, "w") as fh: # Create a file with data in default formatSTRING
MEDIUMnetworkx/readwrite/edgelist.py425 >>> with open(fpath, "w") as fh: # Create a file with flattened edge dataSTRING
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
MEDIUM⚡networkx/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.py49 >>> 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.py927 # 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.py144 # 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.py572 # Create the labels dicts based on node_label and default_labelCOMMENT
MEDIUMnetworkx/algorithms/isomorphism/vf2pp.py577 # 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/edgelist.py407 >>> with open(fpath, "w") as fh: # Create a file with multi edge data attrsSTRING
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
16 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.py142# -------------------------------------------------------------------------------COMMENT
MEDIUMnetworkx/generators/small.py144# -------------------------------------------------------------------------------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.py134# -----------------------STRING
MEDIUMdoc/conf.py214# ------------------------STRING
Over-Commented Block60 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.py481 # Not Part of VF2++. Maybe include in another alg.COMMENT
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_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# other places throughout the built documents.COMMENT
LOWdoc/conf.py181COMMENT
Redundant / Tautological Comments39 hits · 44 pts
SeverityFileLineSnippetContext
LOWnetworkx/readwrite/gexf.py651 # Check if the type of the attribute value is consistent with the type of the attributeSTRING
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.py106 # Check if the graph is still connectedCOMMENT
LOWnetworkx/algorithms/smallworld.py228 # 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.py492 # 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.py122 # 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.py269CODE
LOWnetworkx/drawing/nx_latex.py439CODE
LOWnetworkx/drawing/layout.py452CODE
LOWnetworkx/drawing/layout.py726CODE
LOWnetworkx/drawing/layout.py1475CODE
LOWnetworkx/drawing/layout.py1611CODE
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.py709CODE
LOWnetworkx/algorithms/isomorphism/vf2pp.py758CODE
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
LOW⚡networkx/convert.py90 except Exception as err:CODE
LOW⚡networkx/convert.py99 except Exception as err1:CODE
LOW⚡networkx/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.py418 except Exception:CODE
LOWnetworkx/readwrite/edgelist.py301 except Exception as err:CODE
LOWnetworkx/readwrite/edgelist.py317 except Exception as err:CODE
LOWnetworkx/readwrite/edgelist.py331 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.py384 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.toml420# 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.py901 and node1 is mapped to node2. The purpose of this function is to avoid bruteSTRING