This repository was archived by the owner on Jun 18, 2026. It is now read-only.
fix: ensure edge-only vertices are tracked in ParseResult.getVertices() - #117
Merged
Merged
Conversation
When vertices appear only in edge lines (not in the 'nodes' section), they were added to the JUNG graph by addEdge() but missing from ParseResult.getVertices(). This caused inconsistencies where graph.getVertexCount() != result.getVertices().size(), breaking downstream code that relies on the vertex set for iteration, metrics, or export. Now edge endpoints are explicitly added to both the vertex set and the graph before edge insertion, ensuring consistency regardless of whether vertices are declared in the nodes section.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
When a graph file contains vertices that only appear in edge lines (not in the
odes\ section), \GraphFileParser\ would add them to the JUNG graph via \�ddEdge(), but they were **missing from \ParseResult.getVertices()**. This means:
Fix
Explicitly add edge endpoints to both the vertex tracking set and the graph before edge insertion. Uses \Set.add()\ return value to avoid redundant \�ddVertex()\ calls.
Impact
Fixes silent data loss in graph files where not all vertices are declared in the nodes section.