Repository navigation
Clustering Coefficient 1.0.1: fix runs after a cancellation and on filtered views - #370
Merged
mbastian merged 1 commit intoNov 8, 2026
Merged
Conversation
The cancel flag is static and was never cleared, so once a run had been cancelled no later run calculated anything and the next one failed with a NullPointerException reading the missing values. Clear it when a run starts, and treat a node without a value as 0. The algorithm iterated the nodes of the whole graph but read neighbors in the visible view, which throws for the nodes a filter left out, iterate the view's nodes. Version 1.0.1. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by the SPI contract tests of gephi-plugins-tests (
StatisticsContractTest), run against Gephi 0.11.4.ClusteringCoefficientStatistic.cancelis static and was never reset. After one cancelled run, every later run in the same Gephi session skipped the calculation, then threwNullPointerExceptionreading the missingClustering Coefficientvalues.execute()now clears the flag, and a node without a value counts as 0 in the report.ClusteringCoefficientAlgorithmiterated the nodes of the whole graph but read neighbors in the visible view, which throwsNode doesn't belong to this viewfor the nodes a filter left out. It now iterates the view's own nodes.Verified: the contract tests (gephi-plugins-tests 1.1.1) pass on this module apart from two findings that become warnings in the next gephi-plugins-tests release: an existing column of another type, and a report that changes when saved and reloaded. Short-lived branch off
master-forge, 3 files.